List of usage examples for java.util Map isEmpty
boolean isEmpty();
From source file:Main.java
public static boolean notEmptyAndNull(Map<?, ?> values) { return values != null && !values.isEmpty(); }
From source file:Main.java
/** * Null-safe check if the specified collection is empty. * //w w w .jav a 2 s . c o m * @param coll the collection to check, may be null * @return true if empty or null */ public static boolean isEmpty(Map<?, ?> coll) { return (coll == null || coll.isEmpty()); }
From source file:Main.java
public static boolean isNullOrNothing(final Map map) { return map == null || map.isEmpty(); }
From source file:Main.java
public static <K, V> Map<K, V> copyNullSafeHashMapWithNullValues(Map<? extends K, ? extends V> map) { if (map.isEmpty()) { return Collections.emptyMap(); }//from w w w .j a v a2s . co m return Collections.unmodifiableMap(copyNullSafeMutableHashMapWithNullValues(map)); }
From source file:Main.java
public static boolean isNotEmpty(Map<?, ?> map) { return map != null && !map.isEmpty(); }
From source file:Main.java
public static boolean isNotEmpty(Map<?, ?> map) { if (map != null && !map.isEmpty() && map.size() > 0) { return true; } else {//from ww w . ja v a 2 s . c om return false; } }
From source file:Main.java
public static boolean isNullOrEmpty(final Map<?, ?> m) { return m == null || m.isEmpty(); }
From source file:Main.java
public static boolean isEmpty(Map<?, ?> map) { if (null == map || map.isEmpty() || map.size() <= 0) return true; return false; }
From source file:Main.java
public static <K, V> Map<K, V> copyNullSafeHashMap(Map<? extends K, ? extends V> map) { if (map.isEmpty()) { return Collections.emptyMap(); }/*from ww w .ja v a 2 s . c om*/ return Collections.unmodifiableMap(copyNullSafeMutableHashMap(map)); }
From source file:Main.java
public static boolean isEmpty(Map<?, ?> list) { return list == null || list.isEmpty(); }