|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.AbstractMap<K,V> java.util.TreeMap<K,java.util.Collection<V>> net.ontopia.utils.CollectionSortedMap<K,V>
public class CollectionSortedMap<K,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.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.util.AbstractMap |
---|
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V> |
Field Summary | |
---|---|
protected boolean |
drop_empty
|
Constructor Summary | |
---|---|
CollectionSortedMap()
|
|
CollectionSortedMap(java.util.Comparator<K> c)
|
Method Summary | |
---|---|
void |
add(K key,
V value)
|
protected java.util.Collection<V> |
createCollection()
|
void |
move(V value,
K old_key,
K new_key)
|
void |
remove(K key,
V value)
|
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, put, putAll, 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 |
Field Detail |
---|
protected boolean drop_empty
Constructor Detail |
---|
public CollectionSortedMap()
public CollectionSortedMap(java.util.Comparator<K> c)
Method Detail |
---|
protected java.util.Collection<V> createCollection()
public void add(K key, V value)
public void remove(K key, V value)
public void move(V value, K old_key, K new_key)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |