org.omnaest.utils.structure.map.adapter
Class MapWithKeyMappingAdapter<KEY_TO,KEY_FROM,V>
java.lang.Object
org.omnaest.utils.structure.map.adapter.MapWithKeyMappingAdapter<KEY_TO,KEY_FROM,V>
- Type Parameters:
KEY_TO - KEY_FROM -
- All Implemented Interfaces:
- Map<KEY_TO,V>
public class MapWithKeyMappingAdapter<KEY_TO,KEY_FROM,V>
- extends Object
- implements Map<KEY_TO,V>
Map adapter which allows to define a mapping for the keys of the underlying Map
- Author:
- Omnaest
| Nested classes/interfaces inherited from interface java.util.Map |
Map.Entry<K,V> |
MapWithKeyMappingAdapter
public MapWithKeyMappingAdapter(Map<KEY_FROM,V> map,
DualMap<KEY_FROM,KEY_TO> underlyingMapKeyToAdapterMapKeyMap)
- Parameters:
map - underlyingMapKeyToAdapterMapKeyMap - : DualMap with a mapping from the keys of the given source map to the keys of the new created
MapWithKeyMappingAdapter
size
public int size()
- Specified by:
size in interface Map<KEY_TO,V>
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty in interface Map<KEY_TO,V>
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKey in interface Map<KEY_TO,V>
containsValue
public boolean containsValue(Object value)
- Specified by:
containsValue in interface Map<KEY_TO,V>
get
public V get(Object key)
- Specified by:
get in interface Map<KEY_TO,V>
put
public V put(KEY_TO key,
V value)
- Specified by:
put in interface Map<KEY_TO,V>
remove
public V remove(Object key)
- Specified by:
remove in interface Map<KEY_TO,V>
putAll
public void putAll(Map<? extends KEY_TO,? extends V> m)
- Specified by:
putAll in interface Map<KEY_TO,V>
clear
public void clear()
- Specified by:
clear in interface Map<KEY_TO,V>
keySet
public Set<KEY_TO> keySet()
- Specified by:
keySet in interface Map<KEY_TO,V>
values
public Collection<V> values()
- Specified by:
values in interface Map<KEY_TO,V>
entrySet
public Set<Map.Entry<KEY_TO,V>> entrySet()
- Specified by:
entrySet in interface Map<KEY_TO,V>
equals
public boolean equals(Object o)
- Specified by:
equals in interface Map<KEY_TO,V>- Overrides:
equals in class Object
hashCode
public int hashCode()
- Specified by:
hashCode in interface Map<KEY_TO,V>- Overrides:
hashCode in class Object
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2013. All Rights Reserved.