isEmpty()
public static boolean isEmpty(Collection<?> coll)
Null-safe check if the specified collection is empty.
Null returns true.
Parameters:
coll
- the collection to check, may be null
Returns:
true if empty or null
isNotEmpty()
public static boolean isNotEmpty(Collection<?> coll)
Null-safe check if the specified collection is not empty.
Null returns false.
Parameters:
coll
- the collection to check, may be null
Returns:
true if non-null and non-empty