Package net.ontopia.utils
Class CollectionSortedMap<K,V>
java.lang.Object
java.util.AbstractMap<K,V>
java.util.TreeMap<K,Collection<V>>
net.ontopia.utils.CollectionSortedMap<K,V>
- All Implemented Interfaces:
Serializable,Cloneable,Map<K,,Collection<V>> NavigableMap<K,,Collection<V>> SortedMap<K,Collection<V>>
INTERNAL: A sorted map which stores entries containing Collection
values. Any object can be used as key. The add(key,value) and
remove(key,value) makes sure that the Collection values are updated
correctly.
The maintained index must only contain values implementing the
Collection interface. The data structure looks like this:
{key: [value, value, ...], key: [value, ...]}
Empty entries are removed by default.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.util.TreeMap
ceilingEntry, ceilingKey, clear, clone, comparator, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, descendingKeySet, descendingMap, entrySet, firstEntry, firstKey, floorEntry, floorKey, forEach, get, headMap, headMap, higherEntry, higherKey, keySet, lastEntry, lastKey, lowerEntry, lowerKey, merge, navigableKeySet, pollFirstEntry, pollLastEntry, put, putAll, putIfAbsent, remove, replace, replace, replaceAll, size, subMap, subMap, tailMap, tailMap, valuesMethods inherited from class java.util.AbstractMap
equals, hashCode, isEmpty, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
equals, getOrDefault, hashCode, isEmpty
-
Field Details
-
drop_empty
protected boolean drop_empty
-
-
Constructor Details
-
CollectionSortedMap
public CollectionSortedMap() -
CollectionSortedMap
-
-
Method Details
-
createCollection
-
add
-
remove
-
move
-