List of utility methods to do Collection Empty
boolean | isEmptyCollection(Collection> col) is Empty Collection if (col == null || col.isEmpty()) { return true; return false; |
boolean | isEmptyCollection(Collection> collection) is Empty Collection if (collection != null) { return collection.size() == 0; return true; |
boolean | isEmptyCollection(Object obj) is Empty Collection return obj == null || ((Collection) obj).size() == 0;
|
boolean | isEmptyCollection(Object object) is Empty Collection if (object instanceof Collection<?>) { Collection<?> collection = (Collection<?>) object; return isEmpty(collection); } else { return false; |
void | isEmptyException(Collection collection) This method throws an IllegalArgumentException if the given collection is empty. if (collection.isEmpty()) { throw new IllegalArgumentException("The given collection cannot be empty."); |
boolean | isEmptyNotesField(Collection Tests a collection retrieved by lotus.domino.Document.getItemValue() if it is an empty notes field. if (col == null || col.size() == 0 || (col.size() == 1 && col.toArray()[0].equals(""))) { return true; } else { return false; |
boolean | isEmptyString(Collection Returns if the collection contains only empty objects (i.e. if (theCollection == null) { return false; boolean bReturn = true; for (T theObject : theCollection) { if (!theObject.toString().isEmpty()) { bReturn = false; return bReturn; |
boolean | isNonEmpty(Collection> coll) is Non Empty return !isNullOrEmpty(coll);
|
boolean | isNonEmpty(final Collection values) is Non Empty return !isEmpty(values);
|
boolean | isNotEmpty(@SuppressWarnings("rawtypes") Collection collection) is Not Empty return !isEmpty(collection);
|