public class MapExtensions extends Object
| Constructor and Description |
|---|
MapExtensions() |
| Modifier and Type | Method and Description |
|---|---|
static <K,V> K |
getKeyFromValue(Map<K,V> map,
V value)
Returns the first founded key from the given value or null if nothing is found.
|
static <K,V> Collection<K> |
getKeysFromValue(Map<K,V> map,
V value)
Returns a Collection from all founded keys from the given value or null if nothing found.
|
static Map<Integer,Map<String,String>> |
newAssosiativeArrayMap()
Factory method for
Map that acts like a javascript associative array. |
static <K,V> Map<K,V> |
newLazyMap()
Factory method for create a new
LazyMap from commons-collections4. |
static <K,V> void |
printMap(Map<K,V> msg)
The Method printMap prints the HashMap to the console.
|
static <T> Map<T,T> |
toGenericMap(T[][] twoDimArray)
Converts a two dimensional Array to a Map.
|
static Map<String,String> |
toMap(String[][] twoDimArray)
Converts a two dimensional String Array to a Map.
|
public static <K,V> K getKeyFromValue(Map<K,V> map, V value)
K - the generic type of the keyV - the generic type of the valuemap - The Map.value - The value.public static <K,V> Collection<K> getKeysFromValue(Map<K,V> map, V value)
K - the generic type of the keyV - the generic type of the valuemap - The Map.value - The value.public static <K,V> void printMap(Map<K,V> msg)
K - the generic type of the keyV - the generic type of the valuemsg - The map to print.public static <T> Map<T,T> toGenericMap(T[][] twoDimArray)
T - the generic typetwoDimArray - The two dimensional Array.public static Map<String,String> toMap(String[][] twoDimArray)
twoDimArray - The two dimensional String Array.public static Map<Integer,Map<String,String>> newAssosiativeArrayMap()
Map that acts like a javascript associative array.Map that acts like a javascript associative array.public static <K,V> Map<K,V> newLazyMap()
LazyMap from commons-collections4.LazyMap.Copyright © 2007–2015 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.