|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.alee.utils.MapUtils
public final class MapUtils
This class provides a set of utilities to work with various maps.
Constructor Summary | |
---|---|
MapUtils()
|
Method Summary | ||
---|---|---|
static
|
cloneHashMap(java.util.HashMap<K,V> map)
Returns HashMap with cloned values. |
|
static
|
cloneLinkedHashMap(DoubleMap<K,V> map)
Returns DoubleMap with cloned values. |
|
static
|
cloneLinkedHashMap(java.util.LinkedHashMap<K,V> map)
Returns LinkedHashMap with cloned values. |
|
static
|
cloneMap(java.util.Map<K,V> map)
Returns Map with cloned values. |
|
static
|
copyDoubleMap(DoubleMap<K,V> map)
Returns copied DoubleMap. |
|
static
|
copyHashMap(java.util.HashMap<K,V> map)
Returns copied HashMap. |
|
static
|
copyLinkedHashMap(java.util.LinkedHashMap<K,V> map)
Returns copied LinkedHashMap. |
|
static
|
copyMap(java.util.Map<K,V> map)
Returns copied Map. |
|
static
|
newHashMap(K key,
V value)
Returns newly created HashMap with the specified key and value pair added. |
|
static
|
newLinkedHashMap(K key,
V value)
Returns newly created LinkedHashMap with the specified key and value pair added. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MapUtils()
Method Detail |
---|
public static <K,V> java.util.Map<K,V> copyMap(java.util.Map<K,V> map)
K
- Map key typeV
- Map value typemap
- Map to copy
public static <K,V> java.util.HashMap<K,V> copyHashMap(java.util.HashMap<K,V> map)
K
- HashMap key typeV
- HashMap value typemap
- HashMap to copy
public static <K,V> java.util.LinkedHashMap<K,V> copyLinkedHashMap(java.util.LinkedHashMap<K,V> map)
K
- LinkedHashMap key typeV
- LinkedHashMap value typemap
- LinkedHashMap to copy
public static <K,V> DoubleMap<K,V> copyDoubleMap(DoubleMap<K,V> map)
K
- DoubleMap key typeV
- DoubleMap value typemap
- DoubleMap to copy
public static <K,V extends java.lang.Cloneable> java.util.Map<K,V> cloneMap(java.util.Map<K,V> map)
K
- Map key typeV
- Map value typemap
- Map to clone
public static <K,V extends java.lang.Cloneable> java.util.HashMap<K,V> cloneHashMap(java.util.HashMap<K,V> map)
K
- HashMap key typeV
- HashMap value typemap
- HashMap to clone
public static <K,V extends java.lang.Cloneable> java.util.LinkedHashMap<K,V> cloneLinkedHashMap(java.util.LinkedHashMap<K,V> map)
K
- LinkedHashMap key typeV
- LinkedHashMap value typemap
- LinkedHashMap to clone
public static <K,V extends java.lang.Cloneable> DoubleMap<K,V> cloneLinkedHashMap(DoubleMap<K,V> map)
K
- DoubleMap key typeV
- DoubleMap value typemap
- DoubleMap to clone
public static <K,V> java.util.HashMap<K,V> newHashMap(K key, V value)
K
- key typeV
- value typekey
- key to addvalue
- value to add
public static <K,V> java.util.HashMap<K,V> newLinkedHashMap(K key, V value)
K
- key typeV
- value typekey
- key to addvalue
- value to add
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |