Modifier and Type | Method and Description |
---|---|
static <K,V> void |
addAllToList(Map<? super K,List<V>> map,
Map<? extends K,? extends V> source)
Adds the all values to the list which is in the map with the key.
|
static <K,V> void |
addAllToSet(Map<? super K,Set<V>> map,
Map<? extends K,? extends V> source)
Adds the all values to the set which is in the map with the key.
|
static <K,V> void |
addToList(Map<? super K,List<V>> map,
K key,
V value)
Add the value to the list which is in the map with the key.
|
static <K,V> void |
addToSet(Map<? super K,Set<V>> map,
K key,
V value)
Add the value to the set which is in the map with the key.
|
static <K,V> Map<K,V> |
create()
Creates and returns an empty map.
|
static <K,V> Map<K,V> |
freeze(Map<? extends K,? extends V> map)
Returns a frozen map.
|
static <K,V> Map<K,V> |
from(Map<? extends K,? extends V> map)
Returns a copy of the map.
|
static <K,V> void |
mergeAllIntoList(Map<? super K,List<V>> map,
Map<? extends K,? extends Collection<? extends V>> source)
Merges the all values into the list which is in the map with the key.
|
static <K,V> void |
mergeAllIntoSet(Map<? super K,Set<V>> map,
Map<? extends K,? extends Collection<? extends V>> source)
Merges the all values into the set which is in the map with the key.
|
static <K,V> void |
mergeIntoList(Map<? super K,List<V>> map,
K key,
Collection<? extends V> values)
Merges the values into the list which is in the map with the key.
|
static <K,V> void |
mergeIntoSet(Map<? super K,Set<V>> map,
K key,
Collection<? extends V> values)
Merges the values into the set which is in the map with the key.
|
static <T> Map<T,T> |
pairs(T... pairs)
Returns a map whose key and value have same type.
|
static <K,V> Map<V,List<K>> |
transpose(Map<? extends K,? extends V> map)
Returns a transposed map.
|
public static <K,V> Map<K,V> create()
K
- the key typeV
- the value typepublic static <K,V> Map<K,V> from(Map<? extends K,? extends V> map)
K
- the key typeV
- the value typemap
- target mappublic static <K,V> Map<K,V> freeze(Map<? extends K,? extends V> map)
K
- the key typeV
- the value typemap
- target mappublic static <K,V> Map<V,List<K>> transpose(Map<? extends K,? extends V> map)
K
- the key typeV
- the value typemap
- target map@SafeVarargs public static <T> Map<T,T> pairs(T... pairs)
T
- the key and value typepairs
- array contains key and value alternativelypublic static <K,V> void addToList(Map<? super K,List<V>> map, K key, V value)
K
- the key typeV
- the value typemap
- target mapkey
- the key of target listvalue
- the value to add to target listpublic static <K,V> void addAllToList(Map<? super K,List<V>> map, Map<? extends K,? extends V> source)
K
- the key typeV
- the value typemap
- target mapsource
- the source mappublic static <K,V> void mergeIntoList(Map<? super K,List<V>> map, K key, Collection<? extends V> values)
K
- the key typeV
- the value typemap
- target mapkey
- the key of target listvalues
- the values to merge into target listpublic static <K,V> void mergeAllIntoList(Map<? super K,List<V>> map, Map<? extends K,? extends Collection<? extends V>> source)
K
- the key typeV
- the value typemap
- target mapsource
- the source mappublic static <K,V> void addToSet(Map<? super K,Set<V>> map, K key, V value)
K
- the key typeV
- the value typemap
- target mapkey
- the key of target listvalue
- the value to add to target listpublic static <K,V> void addAllToSet(Map<? super K,Set<V>> map, Map<? extends K,? extends V> source)
K
- the key typeV
- the value typemap
- target mapsource
- the source mappublic static <K,V> void mergeIntoSet(Map<? super K,Set<V>> map, K key, Collection<? extends V> values)
K
- the key typeV
- the value typemap
- target mapkey
- the key of target setvalues
- the values to merge into target setpublic static <K,V> void mergeAllIntoSet(Map<? super K,Set<V>> map, Map<? extends K,? extends Collection<? extends V>> source)
K
- the key typeV
- the value typemap
- target mapsource
- the source mapCopyright © 2011–2019 Asakusa Framework Team. All rights reserved.