List of utility methods to do Collection Check
boolean | isCollection(Class> clazz) Is collection assignable return isAssignable(Collection.class, clazz); |
boolean | isCollection(Class> clazz) is Collection for (Class<?> claz : clazz.getInterfaces()) if (claz == Collection.class) return true; return false; |
boolean | isCollection(Class> clazz) Judge whether class is collection return clazz.isAssignableFrom(List.class) || clazz.isAssignableFrom(Set.class) || clazz.isAssignableFrom(Collection.class); |
boolean | isCollection(Class> klass) is Collection return Collection.class.isAssignableFrom(klass); |
Boolean | isCollection(Class> type) is Collection return Collection.class.isAssignableFrom(type); |
boolean | isCollection(Class Check whether a type is a collection (List, Set, ...). if (clazz == null) { return false; return Collection.class.isAssignableFrom(clazz); |
boolean | isCollection(Class fieldClass) is Collection return Collection.class.isAssignableFrom(fieldClass); |
boolean | isCollection(final Object collection) Returns true if the collection is implements Collection; false otherwise. return collection instanceof Collection; |
boolean | isCollection(final Object obj) is Collection return isInstanceof(obj, Collection.class); |
boolean | isCollection(final Object value) Returns true if the given object is a non-null instance of Collection . return isCollection(value, false);
|