List of utility methods to do Collection Empty Check
boolean | isEmpty(Collection is null or its size is 0 isEmpty(null) = true; isEmpty({}) = true; isEmpty({1}) = false; return (c == null || c.size() == 0);
|
boolean | isEmpty(final Collection> collection) is Empty if (collection == null) { return true; return collection.isEmpty(); |
boolean | isNotEmpty(Collection> collection) Checks if provided Collection is null and not empty. return (collection != null && collection.size() > 0);
|
boolean | isNotEmpty(Collection> list) is Not Empty return !isEmpty(list);
|
boolean | isNotNull(Collection> coll) is Not Null return !isNull(coll);
|
boolean | isNotNull(Collection> collection) is Not Null if (collection != null && collection.size() > 0) { return true; return false; |
boolean | isNull(Collection> coll) is Null if (coll == null) { return true; if (coll.size() == 0) { return true; return false; |
boolean | isNullOrEmpty(Collection collection) is Null Or Empty if (collection == null || collection.isEmpty()) { return true; return false; |
boolean | isEmpty(Collection Is the provided collection null or empty? return collection == null || collection.isEmpty();
|
boolean | isEmpty(Collection collection) * return null == collection || collection.isEmpty();
|