public class Maps extends Object
| Constructor and Description |
|---|
Maps() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
isNullOrEmpty(Map<?,?> map)
Indicates whether the given
Map is null or empty. |
static <K,V> ConcurrentMap<K,V> |
newConcurrentHashMap()
Returns a mutable
ConcurrentMap that is empty. |
static <K,V> Map<K,V> |
newHashMap()
Returns a mutable
HashMap that is empty. |
static <K,V> WeakHashMap<K,V> |
newWeakHashMap()
Returns a mutable
WeakHashMap that is empty. |
public static <K,V> Map<K,V> newHashMap()
HashMap that is empty.K - the type of the keyV - the type of the valueHashMap.public static <K,V> ConcurrentMap<K,V> newConcurrentHashMap()
ConcurrentMap that is empty.K - the type of the keyV - the type of the valueConcurrentMap.public static <K,V> WeakHashMap<K,V> newWeakHashMap()
WeakHashMap that is empty.K - the type of the keyV - the type of the valueWeakHashMap.public static boolean isNullOrEmpty(Map<?,?> map)
Map is null or empty.map - the map to check.true if the given Map is null or empty, otherwise false.Copyright © 2014–2019 AssertJ. All rights reserved.