Package org.jclouds.util
Class Maps2
java.lang.Object
org.jclouds.util.Maps2
General utilities used in jclouds code for
Maps
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <K1,
K2, V>
Map<K2, V> transformKeys
(Map<K1, V> in, com.google.common.base.Function<K1, K2> fn) change the keys but keep the values in-tact.
-
Constructor Details
-
Maps2
public Maps2()
-
-
Method Details
-
transformKeys
public static <K1,K2, Map<K2,V> V> transformKeys(Map<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.
-