List of utility methods to do Collection Check
boolean | isBlank(Collection> c) is Blank return c != null && c.isEmpty();
|
boolean | isBlank(Collection> collection) is Blank return collection == null || collection.size() == 0;
|
boolean | isBlank(final Collection Check if a collection of a string is blank. if (c == null || c.isEmpty()) { return false; for (final String text : c) { if (isNotBlank(text)) { return false; return true; |
boolean | isBlank(final Collection is Blank return (collection == null) || isEmpty(collection);
|
boolean | isBlankAll(Collection>... collections) is Blank All for (Collection<?> c : collections) { if (!isBlank(c)) { return false; return true; |
boolean | isC2InC1(Collection return true if all elements of c2 are in c1 for (T e1 : c1) { boolean e1found = false; for (T theirPlayer : c2) { if (e1.equals(theirPlayer)) { e1found = true; break; if (!e1found) { return false; return true; |
int | isClassCollection(Class> c) is Class Collection if (Collection.class.isAssignableFrom(c)) { return 1; } else if (Map.class.isAssignableFrom(c)) { return 2; } else { return 0; |
boolean | isClassCollection(Class> c) Check if a current class can be cast to collection. return Collection.class.isAssignableFrom(c) || Map.class.isAssignableFrom(c); |
boolean | isClassCollection(Class> type) is Class Collection checkNull(type); boolean collection = false; if (Collection.class.isAssignableFrom(type)) { collection = true; return collection; |
boolean | isCollection(Class> c) Returns true if the specified class is a Collection, otherwise it returns false return containsInterface(c, "java.util.Collection") || isSet(c) || isList(c); |