textbender.g.util
Class MultiMapW<K,V>

java.lang.Object
  extended by MultiMapW<K,V>
All Implemented Interfaces:
MultiMap<K,V>
Direct Known Subclasses:
MultiMap.UnmodifiableMultiMap

@ThreadRestricted(value="per underlying multi-map")
public class MultiMapW<K,V>
extends Object
implements MultiMap<K,V>

A multi-map that wraps an underlying multi-map.


Nested Class Summary
 
Nested classes/interfaces inherited from interface MultiMap
MultiMap.U, MultiMap.UnmodifiableMultiMap<K,V>
 
Constructor Summary
MultiMapW(MultiMap<K,V> multiMap)
          Creates a MultiMapW.
 
Method Summary
 Object get(Object key)
          Returns the values for the specified key.
 MultiMap<K,V> multiMap()
          Returns the underlying multi-map.
 void put(K key, V value)
          Adds a value for the specified key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiMapW

public MultiMapW(MultiMap<K,V> multiMap)
Creates a MultiMapW.

Parameters:
multiMap - per multiMap()
Method Detail

multiMap

public MultiMap<K,V> multiMap()
Returns the underlying multi-map.


get

public Object get(Object key)
Description copied from interface: MultiMap
Returns the values for the specified key. If there are multiple values, they are returned in put-order.

Specified by:
get in interface MultiMap<K,V>
Returns:
either an array Object[] (multiple values); a non-array Object (single value); or null (no value).

put

public void put(K key,
                V value)
Description copied from interface: MultiMap
Adds a value for the specified key.

Specified by:
put in interface MultiMap<K,V>