|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.unkrig.commons.util.collections.MapUtil
public final class MapUtil
Various utility methods for map processing.
| Method Summary | ||
|---|---|---|
static
|
augment(java.util.Map<K,V> delegate,
K extraKey,
V extraValue)
Returns a Map that is composed of the delegate and one extra entry. |
|
static
|
combine(java.util.Map<K,V> map1,
java.util.Map<K,V> map2)
Returns a Map that is composed of the delegate and the parent. |
|
static boolean |
equal(java.lang.Object o1,
java.lang.Object o2)
The often-needed "equal" method that handles null references. |
|
static
|
fromMappings(java.lang.Object... keysAndValues)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static <K,V> java.util.Map<K,V> combine(java.util.Map<K,V> map1,
java.util.Map<K,V> map2)
Map that is composed of the delegate and the parent. The parent is
never modified.
public static <K,V> java.util.Map<K,V> augment(java.util.Map<K,V> delegate,
K extraKey,
V extraValue)
Map that is composed of the delegate and one extra entry.
public static boolean equal(@Nullable
java.lang.Object o1,
@Nullable
java.lang.Object o2)
null references.
Redeemed by java.util.Objects.equals(Object, Object) which is available since Java 1.7.
public static <K,V> java.util.Map<K,V> fromMappings(java.lang.Object... keysAndValues)
keysAndValues - An even-sized array filled alternatingly with objects of type K and V
Map populated from the given key/value pairs
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||