com.sun.xml.bind.v2.schemagen
Class MultiMap<K extends java.lang.Comparable<K>,V>
java.lang.Object
java.util.AbstractMap<K,V>
java.util.TreeMap<K,V>
com.sun.xml.bind.v2.schemagen.MultiMap<K,V>
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, java.util.Map<K,V>, java.util.SortedMap<K,V>
final class MultiMap<K extends java.lang.Comparable<K>,V>
- extends java.util.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.
Method Summary |
V |
put(K key,
V value)
|
void |
putAll(java.util.Map<? extends K,? extends V> map)
|
Methods inherited from class java.util.TreeMap |
clear, clone, comparator, containsKey, containsValue, entrySet, firstKey, get, headMap, keySet, lastKey, remove, size, subMap, 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 |
MultiMap
public MultiMap(V many)
put
public V put(K key,
V value)
- Specified by:
put
in interface java.util.Map<K extends java.lang.Comparable<K>,V>
- Overrides:
put
in class java.util.TreeMap<K extends java.lang.Comparable<K>,V>
putAll
public void putAll(java.util.Map<? extends K,? extends V> map)
- Specified by:
putAll
in interface java.util.Map<K extends java.lang.Comparable<K>,V>
- Overrides:
putAll
in class java.util.TreeMap<K extends java.lang.Comparable<K>,V>