Class MapUtil

Object
com.liferay.portal.kernel.util.MapUtil

public class MapUtil extends Object
Author:
Brian Wing Shun Chan, Raymond Augé
  • Constructor Details

    • MapUtil

      public MapUtil()
  • Method Details

    • copy

      public static <K, V> void copy(Map<? extends K,? extends V> master, Map<? super K,? super V> copy)
    • 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)
    • getWithFallbackKey

      public static <K, V> V getWithFallbackKey(Map<K,V> map, K key, K fallbackKey)
    • isEmpty

      public static boolean isEmpty(Map<?,?> map)
    • isNotEmpty

      public static boolean isNotEmpty(Map<?,?> map)
    • isNotEmptyForEach

      public static <K, V> void isNotEmptyForEach(Map<? extends K,? extends V> map, BiConsumer<? super K,? super V> biConsumer)
    • merge

      public static <K, V> void merge(Map<? extends K,? extends V> master, Map<? super K,? super V> copy)
    • singletonDictionary

      public static <K, V> Dictionary<K,V> singletonDictionary(K key, V value)
    • toLinkedHashMap

      public static <T> LinkedHashMap<String,T> toLinkedHashMap(String[] params)
    • toLinkedHashMap

      public static <T> LinkedHashMap<String,T> toLinkedHashMap(String[] params, String delimiter)
    • toPartitionMap

      public static <K, V> Map<K,List<V>> toPartitionMap(List<V> list, Function<V,K> keyExtractor)
    • toString

      public static String toString(Map<?,?> map)
    • toString

      public static String toString(Map<?,?> map, String hideIncludesRegex, String hideExcludesRegex)