List of utility methods to do Collection Check
boolean | isCollection(Object ob) Check if a current object can be cast to collection. return ob != null && isClassCollection(ob.getClass());
|
boolean | isCollection(Object obj) Checks if provided object is java.util.Collection or Object[] . return obj instanceof Object[] || obj instanceof Collection; |
boolean | isCollection(Object obj) Determines if the given object is any kind of collection return (obj != null && java.util.Collection.class.isAssignableFrom(obj.getClass())); |
boolean | isCollection(Object obj) is Collection if (obj != null && Collection.class.isAssignableFrom(obj.getClass())) { return true; return false; |
boolean | isCollection(Object object) Returns true if the given Object is not null and a Collection derived type return isAssignableFromInstance(Collection.class, object); |
boolean | isCollection(Object object) is Collection if (object == null) return false; return object instanceof java.util.Collection<?>; |
boolean | isCollection(Object value) Returns true if value is either a collection or an array; false otherwise. return value == null ? false : value instanceof Collection<?> || value.getClass().isArray(); |
boolean | isCollection(String type) is Collection return isList(type) || isSet(type);
|
boolean | isCollectional(final Class> type) Indicates whether type represents Collection -typed values. return Collection.class.isAssignableFrom(type); |
boolean | isCollectionOrArray(Class> type) is Collection Or Array return isCollection(type) || type.isArray();
|