List of utility methods to do Collection Empty
boolean | isNotEmpty(E collection) is Not Empty if (collection == null) return false; if (collection.isEmpty()) return false; return true; |
boolean | isNotEmpty(final Collection> coll) Return if a collection is not empty. return !isEmpty(coll);
|
boolean | isNotEmpty(final Collection> collection) Convenience method to determine that a collection is not empty or null. return collection != null && !collection.isEmpty();
|
boolean | isNotEmpty(final Collection> collection) Returns true if this collection contains elements. return collection != null && !collection.isEmpty();
|
boolean | isNotEmpty(final Collection> collection) Returns true if the collection is both not null and not empty; false otherwise. return !isEmpty(collection);
|
boolean | isNotEmpty(final Collection Check if a collection of a string is not empty. return !isEmpty(c);
|
T | isNotEmpty(T collection, String exceptionMessage) Validates that a collection is not empty. if (collection.size() == 0) { throw new IllegalArgumentException(exceptionMessage); return collection; |
boolean | isNotEmptyCollection(Collection> collection) is Not Empty Collection return !isEmptyCollection(collection);
|
boolean | isNotEmptyCollection(Object[] objs) is Not Empty Collection return objs != null && objs.length > 0;
|
void | isNotEmptyException(Collection collection) is Not Empty Exception if (!collection.isEmpty()) { throw new IllegalArgumentException("The given collection cannot be non-empty."); |