List of usage examples for java.util Collection isEmpty
boolean isEmpty();
From source file:Main.java
public static boolean isEmpty(Collection<?> collection) { return (collection == null || collection.isEmpty()); }
From source file:Main.java
public static boolean isEmpty(Collection collection) { return ((collection == null) || collection.isEmpty()); }
From source file:Main.java
public static boolean isNullOrEmpty(Collection<?> collection) { return collection == null || collection.isEmpty(); }
From source file:Main.java
@SuppressWarnings("rawtypes") public static boolean isEmpty(Collection collection) { return (collection == null || collection.isEmpty()); }
From source file:Main.java
public static boolean isEmpty(Collection<?> c) { return c == null || c.isEmpty(); }
From source file:Main.java
public static boolean isEmpty(Collection<?> collection) { if (collection == null || collection.isEmpty()) return true; return false; }
From source file:Main.java
public static <T> Set removeRepetition(Collection<T> ts) { if (ts == null || ts.isEmpty()) { return Collections.emptySet(); }//from ww w . jav a 2 s. co m Map<T, Object> map = new LinkedHashMap(); for (T t : ts) { if (!map.containsKey(t)) { map.put(t, -1); } } Set<T> set = map.keySet(); return set; }
From source file:Main.java
public static boolean isEmpty(Collection collection) { return (collection == null || collection.isEmpty()) ? true : false; }
From source file:Main.java
/** * Null-safe check if the specified collection is empty. * <p>// ww w . j a v a2 s. co m * Null returns true. * * @param coll the collection to check, may be null * @return true if empty or null */ public static boolean isEmpty(Collection<?> coll) { return ((coll == null) || coll.isEmpty()); }
From source file:Main.java
public static boolean empty(Collection<?> c) { return c == null || c.isEmpty(); }