|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.fu_berlin.ties.util.MultiValueMap<K,V>
de.fu_berlin.ties.util.SortedMultiValueMap<K,V>
K
- the type of keysV
- the type of valuespublic class SortedMultiValueMap<K,V>
A MultiValueMap
that sorts the values
stored for each key, discarding duplicates. For this purpose,
TreeSet
s are used for inner collections.
By default, the keys are sorted as well, by wrapping a
TreeMap
. This can be changed by specifying a different kind
of map to wrap in the constructor.
Constructor Summary | |
---|---|
SortedMultiValueMap()
Creates a new instance, wrapping a TreeMap . |
|
SortedMultiValueMap(Map<K,Collection<V>> wrappedMap)
Creates a new instance. |
Method Summary | |
---|---|
protected Collection<V> |
createCollection(Collection<? extends V> coll)
Creates a new instance of the map value Collection container. This implementation returns a TreeSet . |
Methods inherited from class de.fu_berlin.ties.util.MultiValueMap |
---|
clear, containsKey, containsValue, containsValue, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, remove, size, size, totalSize, values |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SortedMultiValueMap()
TreeMap
.
public SortedMultiValueMap(Map<K,Collection<V>> wrappedMap)
wrappedMap
- wrapped map used as storage, e.g. a
HashMap
or a TreeMap
Method Detail |
---|
protected Collection<V> createCollection(Collection<? extends V> coll)
This method can be overridden to use your own collection type.
This implementation returns a TreeSet
.
createCollection
in class MultiValueMap<K,V>
coll
- the collection to copy, may be null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |