public class Maps extends Object
| Constructor and Description |
|---|
Maps() |
| Modifier and Type | Method and Description |
|---|---|
static <T> Integer |
addCount(Map<T,Integer> counts,
T object) |
static <K1,V> boolean |
addToList(Map<K1,List<V>> map,
K1 key1,
V value) |
static <K1,K2,V> void |
addToMap(Map<K1,Map<K2,V>> map,
K1 key1,
K2 key2,
V value) |
static <K1,V> boolean |
addToSet(Map<K1,Set<V>> map,
K1 key1,
V value) |
static <K1,V> boolean |
addToTreeSet(Map<K1,Set<V>> map,
Comparator<V> comparator,
K1 key1,
V value) |
static <K1,V> boolean |
addToTreeSet(Map<K1,Set<V>> map,
K1 key1,
V value) |
static <K1,K2,V> boolean |
containsKey(Map<K1,Map<K2,V>> map,
K1 key1,
K2 key2) |
static <K,V> Map<K,V> |
create(K key,
V value) |
static <K,V> Map<K,V> |
createHashMap(Map<K,? extends V> map) |
static <K,V> Map<K,V> |
createLinkedHashMap(Map<K,? extends V> map) |
static <T1,T2> Map<T1,T2> |
createMap(List<T1> sourceValues,
List<T2> targetValues) |
static <T> T |
get(Map<?,?> map,
Object key,
T defaultValue)
Get the value for the key from the map.
|
static <K,V> V |
get(Map<K,? extends Object> map,
K key,
Factory<V> factory) |
static Object |
get(Map<String,? extends Object> map,
String name) |
static boolean |
getBool(Map<String,? extends Object> map,
String name) |
static boolean |
getBool(Map<String,? extends Object> map,
String name,
boolean defaultValue) |
static Boolean |
getBoolean(Map<String,? extends Object> map,
String name) |
static Double |
getDouble(Map<String,? extends Object> map,
String name) |
static double |
getDouble(Map<String,? extends Object> object,
String name,
double defaultValue) |
static Double |
getDoubleValue(Map<String,? extends Object> map,
String name) |
static Integer |
getInteger(Map<String,? extends Object> map,
String name) |
static int |
getInteger(Map<String,? extends Object> object,
String name,
int defaultValue) |
static <K,V> List<V> |
getList(Map<K,List<V>> map,
K key) |
static Long |
getLong(Map<String,? extends Object> map,
String name) |
static long |
getLong(Map<String,? extends Object> map,
String name,
long defaultValue) |
static <K1,K2,V> Map<K2,V> |
getMap(Map<K1,Map<K2,V>> map,
K1 key) |
static <K1,K2,V> V |
getMap(Map<K1,Map<K2,V>> map,
K1 key1,
K2 key2) |
static <K1,K2,V> V |
getMap(Map<K1,Map<K2,V>> map,
K1 key1,
K2 key2,
Factory<V> factory) |
static <K,V> List<V> |
getNotNull(Map<K,V> map,
Collection<K> keys) |
static String |
getString(Map<String,? extends Object> map,
String name) |
static String |
getString(Map<String,? extends Object> map,
String name,
String defaultValue) |
static <K1,K2,V> Map<K2,V> |
getTreeMap(Map<K1,Map<K2,V>> map,
K1 key) |
static <K,V> Set<V> |
getTreeSet(Map<K,Set<V>> map,
Comparator<V> comparator,
K key) |
static <K,V> Set<V> |
getTreeSet(Map<K,Set<V>> map,
K key) |
static <K,V> Map<K,V> |
hashMap(K key,
V value) |
static boolean |
isNotNullAndNotZero(Map<String,Object> object,
String name) |
static <K,V> void |
mergeCollection(Map<K,Collection<V>> map,
Map<K,Collection<V>> otherMap) |
static <K1,K2,V> V |
put(Map<K1,Map<K2,V>> map,
K1 key1,
K2 key2,
V value) |
static <K,V extends Comparable<V>> |
putIfGreaterThan(Map<K,V> map,
K key,
V value) |
static <K,V> boolean |
removeFromCollection(Map<K,? extends Collection<V>> map,
K key,
V value) |
static <K,V> boolean |
removeFromSet(Map<K,Set<V>> map,
K key,
V value) |
static <K,V extends Comparable<V>> |
removeIfGreaterThanEqual(Map<K,V> map,
K key,
V value) |
static <K,V extends Comparable<V>> |
removeIfLessThanEqual(Map<K,V> map,
K key,
V value) |
static Map<String,Object> |
toMap(Preferences preferences) |
static Map<String,String> |
toMap(String string) |
static <K,V> Map<K,V> |
treeMap(K key,
V value) |
public static <K1,V> boolean addToTreeSet(Map<K1,Set<V>> map, Comparator<V> comparator, K1 key1, V value)
public static <K,V> Map<K,V> create(K key, V value)
public static <T> T get(Map<?,?> map, Object key, T defaultValue)
map - The map.key - The key to return the value for.defaultValue - The default value.public static boolean getBool(Map<String,? extends Object> map, String name, boolean defaultValue)
public static double getDouble(Map<String,? extends Object> object, String name, double defaultValue)
public static int getInteger(Map<String,? extends Object> object, String name, int defaultValue)
public static long getLong(Map<String,? extends Object> map, String name, long defaultValue)
public static <K1,K2,V> V getMap(Map<K1,Map<K2,V>> map, K1 key1, K2 key2, Factory<V> factory)
public static <K,V> List<V> getNotNull(Map<K,V> map, Collection<K> keys)
public static String getString(Map<String,? extends Object> map, String name, String defaultValue)
public static <K,V> Set<V> getTreeSet(Map<K,Set<V>> map, Comparator<V> comparator, K key)
public static <K,V> Map<K,V> hashMap(K key, V value)
public static boolean isNotNullAndNotZero(Map<String,Object> object, String name)
public static <K,V> void mergeCollection(Map<K,Collection<V>> map, Map<K,Collection<V>> otherMap)
public static <K,V extends Comparable<V>> void putIfGreaterThan(Map<K,V> map, K key, V value)
public static <K,V> boolean removeFromCollection(Map<K,? extends Collection<V>> map, K key, V value)
public static <K,V extends Comparable<V>> void removeIfGreaterThanEqual(Map<K,V> map, K key, V value)
public static <K,V extends Comparable<V>> void removeIfLessThanEqual(Map<K,V> map, K key, V value)
public static Map<String,Object> toMap(Preferences preferences)
public static <K,V> Map<K,V> treeMap(K key, V value)
Copyright © 2015 Revolution Systems Inc.. All rights reserved.