public final class ObjectUtils extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
static boolean |
isArray(Object obj)
Determine whether the given object is an array:
either an Object array or a primitive array.
|
static boolean |
isEmpty(Object obj)
Determine whether the given object is empty.
|
static boolean |
isEmpty(Object[] array)
Determine whether the given array is empty:
i.e.
|
public static boolean isArray(Object obj)
public static boolean isEmpty(Object[] array)
null or of zero length.isEmpty(Object)public static boolean isEmpty(Object obj)
This method supports the following object types.
Optional: considered empty if not Optional.isPresent()Array: considered empty if its length is zeroCharSequence: considered empty if its length is zeroCollection: delegates to Collection.isEmpty()Map: delegates to Map.isEmpty()If the given object is non-null and not one of the aforementioned
supported types, this method returns false.
true if the object is null or emptyCopyright © 2024 tan. All rights reserved.