com.liferay.portal.kernel.util
Class MapUtil
java.lang.Object
com.liferay.portal.kernel.util.MapUtil
- Direct Known Subclasses:
- MapUtil
public class MapUtil
- extends Object
|
Method Summary |
static
|
copy(Map<? extends K,? extends V> master,
Map<? super K,? super V> copy)
|
static
|
entryKeyPredicateFilter(PredicateFilter<K> predicateFilter)
|
static
|
entryValuePredicateFilter(PredicateFilter<V> predicateFilter)
|
static
<K1,V1,K2 extends K1,V2 extends V1>
void |
|
filter(Map<? extends K2,? extends V2> inputMap,
Map<? super K2,? super V2> outputMap,
PredicateFilter<? super Map.Entry<K1,V1>> predicateFilter)
|
static
<K1,V1,K2 extends K1,V2 extends V1>
Map<K2,V2> |
|
filter(Map<K2,V2> inputMap,
PredicateFilter<? super Map.Entry<K1,V1>> predicateFilter)
|
static
|
filterByKeys(Map<? extends K,? extends V> inputMap,
Map<? super K,? super V> outputMap,
PredicateFilter<? super K> keyPredicateFilter)
|
static
|
filterByKeys(Map<K,V> inputMap,
PredicateFilter<? super K> keyPredicateFilter)
|
static
|
filterByValues(Map<? extends K,? extends V> inputMap,
Map<? super K,? super V> outputMap,
PredicateFilter<? super V> valuePredicateFilter)
|
static
|
filterByValues(Map<K,V> inputMap,
PredicateFilter<? super V> keyPredicateFilter)
|
static
|
fromArray(T... array)
|
static boolean |
getBoolean(Map<String,?> map,
String key)
|
static boolean |
getBoolean(Map<String,?> map,
String key,
boolean defaultValue)
|
static double |
getDouble(Map<String,?> map,
String key)
|
static double |
getDouble(Map<String,?> map,
String key,
double defaultValue)
|
static int |
getInteger(Map<String,?> map,
String key)
|
static int |
getInteger(Map<String,?> map,
String key,
int defaultValue)
|
static long |
getLong(Map<Long,Long> map,
long key)
|
static long |
getLong(Map<Long,Long> map,
long key,
long defaultValue)
|
static long |
getLong(Map<String,?> map,
String key)
|
static long |
getLong(Map<String,?> map,
String key,
long defaultValue)
|
static short |
getShort(Map<String,?> map,
String key)
|
static short |
getShort(Map<String,?> map,
String key,
short defaultValue)
|
static String |
getString(Map<String,?> map,
String key)
|
static String |
getString(Map<String,?> map,
String key,
String defaultValue)
|
static boolean |
isEmpty(Map<?,?> map)
|
static boolean |
isNotEmpty(Map<?,?> map)
|
static
|
merge(Map<? extends K,? extends V> master,
Map<? super K,? super V> copy)
|
static
|
toLinkedHashMap(String[] params)
|
static
|
toLinkedHashMap(String[] params,
String delimiter)
|
static String |
toString(Map<?,?> map)
|
static String |
toString(Map<?,?> map,
String hideIncludesRegex,
String hideExcludesRegex)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MapUtil
public MapUtil()
copy
public static <K,V> void copy(Map<? extends K,? extends V> master,
Map<? super K,? super V> copy)
entryKeyPredicateFilter
public static <K> PredicateFilter<Map.Entry<K,?>> entryKeyPredicateFilter(PredicateFilter<K> predicateFilter)
entryValuePredicateFilter
public static <V> PredicateFilter<Map.Entry<?,V>> entryValuePredicateFilter(PredicateFilter<V> predicateFilter)
filter
public static <K1,V1,K2 extends K1,V2 extends V1> void filter(Map<? extends K2,? extends V2> inputMap,
Map<? super K2,? super V2> outputMap,
PredicateFilter<? super Map.Entry<K1,V1>> predicateFilter)
filter
public static <K1,V1,K2 extends K1,V2 extends V1> Map<K2,V2> filter(Map<K2,V2> inputMap,
PredicateFilter<? super Map.Entry<K1,V1>> predicateFilter)
filterByKeys
public static <K,V> void filterByKeys(Map<? extends K,? extends V> inputMap,
Map<? super K,? super V> outputMap,
PredicateFilter<? super K> keyPredicateFilter)
filterByKeys
public static <K,V> Map<K,V> filterByKeys(Map<K,V> inputMap,
PredicateFilter<? super K> keyPredicateFilter)
filterByValues
public static <K,V> void filterByValues(Map<? extends K,? extends V> inputMap,
Map<? super K,? super V> outputMap,
PredicateFilter<? super V> valuePredicateFilter)
filterByValues
public static <K,V> Map<K,V> filterByValues(Map<K,V> inputMap,
PredicateFilter<? super V> keyPredicateFilter)
fromArray
public static <T> Map<T,T> fromArray(T... array)
getBoolean
public static boolean getBoolean(Map<String,?> map,
String key)
getBoolean
public static boolean getBoolean(Map<String,?> map,
String key,
boolean defaultValue)
getDouble
public static double getDouble(Map<String,?> map,
String key)
getDouble
public static double getDouble(Map<String,?> map,
String key,
double defaultValue)
getInteger
public static int getInteger(Map<String,?> map,
String key)
getInteger
public static int getInteger(Map<String,?> map,
String key,
int defaultValue)
getLong
public static long getLong(Map<Long,Long> map,
long key)
getLong
public static long getLong(Map<Long,Long> map,
long key,
long defaultValue)
getLong
public static long getLong(Map<String,?> map,
String key)
getLong
public static long getLong(Map<String,?> map,
String key,
long defaultValue)
getShort
public static short getShort(Map<String,?> map,
String key)
getShort
public static short getShort(Map<String,?> map,
String key,
short defaultValue)
getString
public static String getString(Map<String,?> map,
String key)
getString
public static String getString(Map<String,?> map,
String key,
String defaultValue)
isEmpty
public static boolean isEmpty(Map<?,?> map)
isNotEmpty
public static boolean isNotEmpty(Map<?,?> map)
merge
public static <K,V> void merge(Map<? extends K,? extends V> master,
Map<? super K,? super V> copy)
toLinkedHashMap
public static <T> LinkedHashMap<String,T> toLinkedHashMap(String[] params)
toLinkedHashMap
public static <T> LinkedHashMap<String,T> toLinkedHashMap(String[] params,
String delimiter)
toString
public static String toString(Map<?,?> map)
toString
public static String toString(Map<?,?> map,
String hideIncludesRegex,
String hideExcludesRegex)