org.omnaest.utils.structure.map
Class MapComposite<K,V>

java.lang.Object
  extended by org.omnaest.utils.structure.map.MapAbstract<K,V>
      extended by org.omnaest.utils.structure.map.MapComposite<K,V>
Type Parameters:
K -
V -
All Implemented Interfaces:
Serializable, Map<K,V>

public class MapComposite<K,V>
extends MapAbstract<K,V>

Map implementation which is based on a given List of further Map instances.

The MapComposite is thread safe itself, but to be fully thread safe the given further Map instances have to be ,too.

Author:
Omnaest
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Constructor Summary
MapComposite(List<Map<K,V>> mapList)
           
MapComposite(Map<K,V>... maps)
           
 
Method Summary
 V get(Object key)
           
 Set<K> keySet()
           
 V put(K key, V value)
           
 V remove(Object key)
           
 Collection<V> values()
           
 
Methods inherited from class org.omnaest.utils.structure.map.MapAbstract
clear, containsKey, containsValue, entrySet, isEmpty, putAll, size, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

MapComposite

public MapComposite(List<Map<K,V>> mapList)
Parameters:
mapList -
See Also:
MapComposite

MapComposite

public MapComposite(Map<K,V>... maps)
Parameters:
maps -
See Also:
MapComposite
Method Detail

get

public V get(Object key)

put

public V put(K key,
             V value)

remove

public V remove(Object key)

keySet

public Set<K> keySet()

values

public Collection<V> values()


Copyright © 2013. All Rights Reserved.