com.sun.xml.bind.v2.schemagen
Class MultiMap<K extends Comparable<K>,V>

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.TreeMap<K,V>
          extended by com.sun.xml.bind.v2.schemagen.MultiMap<K,V>
All Implemented Interfaces:
Serializable, Cloneable, Map<K,V>, NavigableMap<K,V>, SortedMap<K,V>

final class MultiMap<K extends Comparable<K>,V>
extends TreeMap<K,V>

A special Map that 'conceptually' stores a set of values for each key.

When multiple values are stored, however, this class doesn't let the caller see individual values, and instead it returns a specially designated "MANY" value, which is given as a parameter to the constructor.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Constructor Summary
MultiMap(V many)
           
 
Method Summary
 V put(K key, V value)
           
 void putAll(Map<? extends K,? extends V> map)
           
 
Methods inherited from class java.util.TreeMap
ceilingEntry, ceilingKey, clear, clone, comparator, containsKey, containsValue, descendingKeySet, descendingMap, entrySet, firstEntry, firstKey, floorEntry, floorKey, get, headMap, headMap, higherEntry, higherKey, keySet, lastEntry, lastKey, lowerEntry, lowerKey, navigableKeySet, pollFirstEntry, pollLastEntry, remove, size, subMap, subMap, tailMap, tailMap, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, isEmpty, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode, isEmpty
 

Constructor Detail

MultiMap

public MultiMap(V many)
Method Detail

put

public V put(K key,
             V value)
Specified by:
put in interface Map<K extends Comparable<K>,V>
Overrides:
put in class TreeMap<K extends Comparable<K>,V>

putAll

public void putAll(Map<? extends K,? extends V> map)
Specified by:
putAll in interface Map<K extends Comparable<K>,V>
Overrides:
putAll in class TreeMap<K extends Comparable<K>,V>