List of usage examples for java.util Collection isEmpty
boolean isEmpty();
From source file:Main.java
public static <E> boolean isEmpty(Collection<E> collection) { return collection == null || collection.isEmpty(); }
From source file:Main.java
public static boolean isEmptyCollection(Collection<?> cols) { if (cols == null || cols.isEmpty()) { return true; }/*from w ww . j a va 2 s . co m*/ Iterator<?> ite = cols.iterator(); while (ite.hasNext()) { if (ite.next() == null) { return true; } } return false; }
From source file:Main.java
public static boolean isNullOrEmpty(Collection<?> collection) { return (collection == null) || (collection.isEmpty()); }
From source file:Main.java
/** * added by liyong/*from ww w .ja v a2 s. c o m*/ */ public static boolean isEmpty(Collection c) { return c == null || c.isEmpty(); }
From source file:Main.java
public static <T> boolean isEmpty(Collection<T> collection) { return (collection == null || collection.isEmpty()); }
From source file:Main.java
public static boolean isNull(Collection<?> collection) { if (collection == null || collection.isEmpty()) { return true; }/* w w w. j a v a 2 s.c o m*/ return false; }
From source file:Main.java
/** * Implementation of the OCL//from www . j a va2s .c om * <tt>Collection::notEmpty() : Boolean</tt> * operation. * * @param self the source collection * @return whether the collection has any elements */ public static boolean notEmpty(Collection<?> self) { return !self.isEmpty(); }
From source file:Main.java
public static boolean nonEmpty(Collection<?> col) { return col != null && !col.isEmpty(); }
From source file:Main.java
public static boolean isNotEmpty(Collection<?> collection) { return collection != null && !collection.isEmpty(); }
From source file:Main.java
public static <T> boolean isEmpty(Collection<T> aCollection) { return (aCollection == null || aCollection.isEmpty()); }