Package org.jclouds.util
Class Multimaps2
- java.lang.Object
-
- org.jclouds.util.Multimaps2
-
public class Multimaps2 extends Object
-
-
Constructor Summary
Constructors Constructor Description Multimaps2()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <K,V>
com.google.common.collect.Multimap<K,V>replaceEntries(com.google.common.collect.Multimap<K,V> fromMultimap, com.google.common.collect.Multimap<K,V> updates)
static <K,V>
com.google.common.collect.Multimap<K,V>replaceValue(com.google.common.collect.Multimap<K,V> fromMultimap, K key, V value)
static <K1,K2,V>
com.google.common.collect.Multimap<K2,V>transformKeys(com.google.common.collect.Multimap<K1,V> in, com.google.common.base.Function<K1,K2> fn)
change the keys but keep the values in-tact.static <K,V>
com.google.common.collect.Multimap<K,V>withoutKey(com.google.common.collect.Multimap<K,V> fromMultimap, K key)
static <K,V>
com.google.common.collect.Multimap<K,V>withoutKeys(com.google.common.collect.Multimap<K,V> fromMultimap, Set<K> keys)
-
-
-
Method Detail
-
replaceValue
public static <K,V> com.google.common.collect.Multimap<K,V> replaceValue(com.google.common.collect.Multimap<K,V> fromMultimap, K key, V value)
-
replaceEntries
public static <K,V> com.google.common.collect.Multimap<K,V> replaceEntries(com.google.common.collect.Multimap<K,V> fromMultimap, com.google.common.collect.Multimap<K,V> updates)
-
withoutKey
public static <K,V> com.google.common.collect.Multimap<K,V> withoutKey(com.google.common.collect.Multimap<K,V> fromMultimap, K key)
-
withoutKeys
public static <K,V> com.google.common.collect.Multimap<K,V> withoutKeys(com.google.common.collect.Multimap<K,V> fromMultimap, Set<K> keys)
-
transformKeys
public static <K1,K2,V> com.google.common.collect.Multimap<K2,V> transformKeys(com.google.common.collect.Multimap<K1,V> in, com.google.common.base.Function<K1,K2> fn)
change the keys but keep the values in-tact.- Type Parameters:
K1
- input key typeK2
- output key typeV
- value type- Parameters:
in
- input map to transformfn
- how to transform the values- Returns:
- immutableMap with the new keys.
-
-