@InterfaceAudience.Public @InterfaceStability.Evolving public final class MapUtils extends Object
| Constructor and Description |
|---|
MapUtils() |
| Modifier and Type | Method and Description |
|---|---|
static <K,V> K |
getKey(Map<K,V> map,
V value)
Gets the key based on value.
|
static Map<String,String> |
toMap(String property,
String entryDelimiter,
String keyValueDelimiter)
Gets the property as map based on the delimiters provided, and uses
LinkedHashMap. |
static <K,V> Map<K,V> |
toMap(String property,
String entryDelimiter,
String keyValueDelimiter,
Class<? extends Map> klass,
Class<K> keyClass,
Class<V> valueClass)
Gets the property as map based on the delimiters provided, and uses your
specified class.
|
public static <K,V> K getKey(Map<K,V> map, V value)
K - the key typeV - the value typemap - the mapvalue - the valuepublic static Map<String,String> toMap(String property, String entryDelimiter, String keyValueDelimiter)
LinkedHashMap.property - the propertyentryDelimiter - the entry delimiterkeyValueDelimiter - the key value delimiterpublic static <K,V> Map<K,V> toMap(String property, String entryDelimiter, String keyValueDelimiter, Class<? extends Map> klass, Class<K> keyClass, Class<V> valueClass)
K - the key typeV - the value typeproperty - the propertyentryDelimiter - the entry delimiterkeyValueDelimiter - the key value delimiterklass - the klasskeyClass - the key classvalueClass - the value classCopyright © 2016 utils4j. All Rights Reserved.