org.jclouds.collect
Class TransformingMap<K,V1,V2>
java.lang.Object
java.util.AbstractMap<K,V2>
org.jclouds.collect.TransformingMap<K,V1,V2>
- All Implemented Interfaces:
- Map<K,V2>
public class TransformingMap<K,V1,V2>
- extends AbstractMap<K,V2>
A map that transforms values on the way in and out. Inspired by the guava method
Maps.transformValues
.
- Author:
- Adrian Cole
Nested classes/interfaces inherited from interface java.util.Map |
Map.Entry<K,V> |
Constructor Summary |
TransformingMap(Map<K,V1> fromMap,
com.google.common.base.Function<? super V1,V2> getFunction,
com.google.common.base.Function<? super V2,V1> putFunction)
|
TransformingMap
public TransformingMap(Map<K,V1> fromMap,
com.google.common.base.Function<? super V1,V2> getFunction,
com.google.common.base.Function<? super V2,V1> putFunction)
size
public int size()
- Specified by:
size
in interface Map<K,V2>
- Overrides:
size
in class AbstractMap<K,V2>
put
public V2 put(K key,
V2 value)
- Specified by:
put
in interface Map<K,V2>
- Overrides:
put
in class AbstractMap<K,V2>
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKey
in interface Map<K,V2>
- Overrides:
containsKey
in class AbstractMap<K,V2>
get
public V2 get(Object key)
- Specified by:
get
in interface Map<K,V2>
- Overrides:
get
in class AbstractMap<K,V2>
remove
public V2 remove(Object key)
- Specified by:
remove
in interface Map<K,V2>
- Overrides:
remove
in class AbstractMap<K,V2>
clear
public void clear()
- Specified by:
clear
in interface Map<K,V2>
- Overrides:
clear
in class AbstractMap<K,V2>
entrySet
public Set<Map.Entry<K,V2>> entrySet()
- Specified by:
entrySet
in interface Map<K,V2>
- Specified by:
entrySet
in class AbstractMap<K,V2>
Copyright © 2009-2011 jclouds. All Rights Reserved.