List of usage examples for java.util Collection size
int size();
From source file:Main.java
public static boolean isNotEmpty(Collection collection) { if (collection != null && collection.size() > 0) { return true; }/* w ww .ja v a 2s . c om*/ return false; }
From source file:Main.java
public static <T> boolean isEmpty(Collection<T> collection) { return collection == null || collection.size() == 0; }
From source file:Main.java
public static boolean isCollectionEmpty(Collection pCollection) { return null != pCollection && pCollection.size() > 0; }
From source file:Main.java
public static boolean isNotNull(Collection<?> collection) { return collection != null && collection.size() > 0; }
From source file:Main.java
public static boolean isNotEmpty(Collection<?> collection) { return collection != null && collection.size() > 0; }
From source file:Main.java
public static boolean isEmpty(Collection collection) { if (null == collection || collection.size() <= 0) { return true; }//from ww w. j a va 2s . c o m return false; }
From source file:Main.java
public static final boolean emptyCollection(Collection collection) { return (collection == null) || (collection.size() < 1); }
From source file:com.apextom.util.CollectionUtil.java
/** * ? null ./*from w w w . j a va 2 s. c o m*/ * * @param list */ public static void removeNull(Collection<Object> list) { if (list == null || list.size() == 0) { return; } Iterator<Object> iter = list.iterator(); while (iter.hasNext()) { if (iter.next() == null) { iter.remove(); } } }
From source file:Main.java
public static boolean isSingletonList(Collection<?> col) { return col != null && col.size() == 1; }
From source file:Main.java
public static <V> boolean isEmpty(Collection<V> c) { return (c == null || c.size() == 0); }