Package org.silverpeas.core.util
Class MapUtil
- java.lang.Object
-
- org.silverpeas.core.util.MapUtil
-
public class MapUtil extends Object
- Author:
- Yohann Chastagnier
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <K,V>
booleanareEqual(Map<? extends K,? extends V> left, Map<? extends K,? extends V> right)
static <K,V>
Collection<V>putAdd(Class<? extends Collection> collectionClass, Map<K,Collection<V>> map, K key, V value)
Centralizes the map adding that containing collectionsstatic <K,V>
Collection<V>putAddAll(Class<? extends Collection> collectionClass, Map<K,Collection<V>> map, K key, Collection<V> values)
Centralizes the map adding that containing collectionsstatic <K,V>
List<V>putAddAllList(Class<? extends List> listClass, Map<K,List<V>> map, K key, Collection<V> values)
Centralizes the map adding that containing list collectionsstatic <K,V>
List<V>putAddAllList(Map<K,List<V>> map, K key, Collection<V> values)
Centralizes the map adding that containing list collectionsstatic <K,V>
Set<V>putAddAllSet(Class<? extends Set> setClass, Map<K,Set<V>> map, K key, Collection<V> values)
Centralizes the map adding that containing list collectionsstatic <K,V>
Set<V>putAddAllSet(Map<K,Set<V>> map, K key, Collection<V> values)
Centralizes the map adding that containing list collectionsstatic <K,V>
List<V>putAddList(Class<? extends List> listClass, Map<K,List<V>> map, K key, V value)
Centralizes the map adding that containing list collectionsstatic <K,V>
List<V>putAddList(Map<K,List<V>> map, K key, V value)
Centralizes the map adding that containing list collectionsstatic <K,V>
Set<V>putAddSet(Class<? extends Set> setClass, Map<K,Set<V>> map, K key, V value)
Centralizes the map adding that containing set collectionsstatic <K,V>
Set<V>putAddSet(Map<K,Set<V>> map, K key, V value)
Centralizes the map adding that containing set collectionsstatic <K,V>
List<V>removeValueList(Map<K,List<V>> map, K key, V value)
Centralizes the map removing that containing list collectionsstatic <K,V>
Set<V>removeValueSet(Map<K,Set<V>> map, K key, V value)
Centralizes the map removing that containing set collections
-
-
-
Method Detail
-
putAddAll
public static <K,V> Collection<V> putAddAll(Class<? extends Collection> collectionClass, Map<K,Collection<V>> map, K key, Collection<V> values)
Centralizes the map adding that containing collections- Type Parameters:
K
-V
-- Parameters:
map
-key
-values
-- Returns:
-
putAdd
public static <K,V> Collection<V> putAdd(Class<? extends Collection> collectionClass, Map<K,Collection<V>> map, K key, V value)
Centralizes the map adding that containing collections- Type Parameters:
K
-V
-- Parameters:
map
-key
-value
-- Returns:
-
putAddAllList
public static <K,V> List<V> putAddAllList(Map<K,List<V>> map, K key, Collection<V> values)
Centralizes the map adding that containing list collections- Type Parameters:
K
-V
-- Parameters:
map
-key
-values
-- Returns:
-
putAddList
public static <K,V> List<V> putAddList(Map<K,List<V>> map, K key, V value)
Centralizes the map adding that containing list collections- Type Parameters:
K
-V
-- Parameters:
map
-key
-value
-- Returns:
-
putAddAllSet
public static <K,V> Set<V> putAddAllSet(Map<K,Set<V>> map, K key, Collection<V> values)
Centralizes the map adding that containing list collections- Type Parameters:
K
-V
-- Parameters:
map
-key
-values
-- Returns:
-
putAddSet
public static <K,V> Set<V> putAddSet(Map<K,Set<V>> map, K key, V value)
Centralizes the map adding that containing set collections- Type Parameters:
K
-V
-- Parameters:
map
-key
-value
-- Returns:
-
putAddAllList
public static <K,V> List<V> putAddAllList(Class<? extends List> listClass, Map<K,List<V>> map, K key, Collection<V> values)
Centralizes the map adding that containing list collections- Type Parameters:
K
-V
-- Parameters:
listClass
-map
-key
-values
-- Returns:
-
putAddList
public static <K,V> List<V> putAddList(Class<? extends List> listClass, Map<K,List<V>> map, K key, V value)
Centralizes the map adding that containing list collections- Type Parameters:
K
-V
-- Parameters:
listClass
-map
-key
-value
-- Returns:
-
putAddAllSet
public static <K,V> Set<V> putAddAllSet(Class<? extends Set> setClass, Map<K,Set<V>> map, K key, Collection<V> values)
Centralizes the map adding that containing list collections- Type Parameters:
K
-V
-- Parameters:
setClass
-map
-key
-values
-- Returns:
-
putAddSet
public static <K,V> Set<V> putAddSet(Class<? extends Set> setClass, Map<K,Set<V>> map, K key, V value)
Centralizes the map adding that containing set collections- Type Parameters:
K
-V
-- Parameters:
setClass
-map
-key
-value
-- Returns:
-
removeValueList
public static <K,V> List<V> removeValueList(Map<K,List<V>> map, K key, V value)
Centralizes the map removing that containing list collections- Type Parameters:
K
-V
-- Parameters:
map
-key
-value
-- Returns:
-
removeValueSet
public static <K,V> Set<V> removeValueSet(Map<K,Set<V>> map, K key, V value)
Centralizes the map removing that containing set collections- Type Parameters:
K
-V
-- Parameters:
map
-key
-value
-- Returns:
-
-