|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object akka.util.SubclassifiedIndex<K,V>
public class SubclassifiedIndex<K,V>
Mutable index which respects sub-class relationships between keys:
- adding a key inherits from super-class - adding values applies to all sub-classes - removing values applies to all sub-classes
Currently this class is only used to keep the tree and return changed key- value-sets upon modification, since looking up the keys in an external cache, e.g. HashMap, is faster than tree traversal which must use linear scan at each level. Therefore, no value traversals are published.
Nested Class Summary | |
---|---|
static class |
SubclassifiedIndex.Nonroot<K,V>
|
Constructor Summary | |
---|---|
SubclassifiedIndex(Subclassification<K> sc)
|
Method Summary | ||
---|---|---|
scala.collection.immutable.Seq<scala.Tuple2<K,scala.collection.immutable.Set<V>>> |
addKey(K key)
Add key to this index which inherits its value set from the most specific super-class which is known. |
|
scala.collection.immutable.Seq<scala.Tuple2<K,scala.collection.immutable.Set<V>>> |
addValue(K key,
V value)
Add value to all keys which are subclasses of the given key. |
|
static
|
emptyMergeMap()
|
|
protected scala.collection.immutable.Set<K> |
findSubKeysExcept(K key,
scala.collection.immutable.Vector<SubclassifiedIndex.Nonroot<K,V>> except)
Find all subkeys of a given key in the index excluding some subkeys. |
|
protected scala.collection.immutable.Set<V> |
findValues(K key)
Find all values for a given key in the index. |
|
protected scala.collection.immutable.Seq<scala.Tuple2<K,scala.collection.immutable.Set<V>>> |
innerAddKey(K key)
|
|
protected scala.collection.immutable.Seq<scala.Tuple2<K,scala.collection.immutable.Set<V>>> |
innerAddValue(K key,
V value)
|
|
protected scala.collection.immutable.Set<K> |
innerFindSubKeys(K key,
scala.collection.immutable.Vector<SubclassifiedIndex.Nonroot<K,V>> except)
|
|
protected scala.collection.immutable.Set<V> |
innerFindValues(K key)
|
|
protected scala.collection.immutable.Seq<scala.Tuple2<K,scala.collection.immutable.Set<V>>> |
innerRemoveValue(K key,
V value)
|
|
scala.collection.immutable.Seq<scala.Tuple2<K,scala.collection.immutable.Set<V>>> |
removeValue(K key,
V value)
Remove value from all keys which are subclasses of the given key. |
|
scala.collection.immutable.Seq<scala.Tuple2<K,scala.collection.immutable.Set<V>>> |
removeValue(V value)
Remove value from all keys in the index. |
|
protected SubclassifiedIndex<K,V> |
root()
|
|
protected scala.collection.immutable.Vector<SubclassifiedIndex.Nonroot<K,V>> |
subkeys()
|
|
java.lang.String |
toString()
|
|
protected scala.collection.immutable.Set<V> |
values()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SubclassifiedIndex(Subclassification<K> sc)
Method Detail |
---|
public static <K,V> scala.collection.immutable.Map<K,scala.collection.immutable.Set<V>> emptyMergeMap()
protected scala.collection.immutable.Set<V> values()
protected scala.collection.immutable.Vector<SubclassifiedIndex.Nonroot<K,V>> subkeys()
protected SubclassifiedIndex<K,V> root()
public scala.collection.immutable.Seq<scala.Tuple2<K,scala.collection.immutable.Set<V>>> addKey(K key)
key
- (undocumented)
protected scala.collection.immutable.Seq<scala.Tuple2<K,scala.collection.immutable.Set<V>>> innerAddKey(K key)
public scala.collection.immutable.Seq<scala.Tuple2<K,scala.collection.immutable.Set<V>>> addValue(K key, V value)
key
- (undocumented)value
- (undocumented)
protected scala.collection.immutable.Seq<scala.Tuple2<K,scala.collection.immutable.Set<V>>> innerAddValue(K key, V value)
public scala.collection.immutable.Seq<scala.Tuple2<K,scala.collection.immutable.Set<V>>> removeValue(K key, V value)
key
- (undocumented)value
- (undocumented)
protected scala.collection.immutable.Seq<scala.Tuple2<K,scala.collection.immutable.Set<V>>> innerRemoveValue(K key, V value)
public scala.collection.immutable.Seq<scala.Tuple2<K,scala.collection.immutable.Set<V>>> removeValue(V value)
value
- (undocumented)
protected final scala.collection.immutable.Set<V> findValues(K key)
key
- (undocumented)
protected scala.collection.immutable.Set<V> innerFindValues(K key)
protected final scala.collection.immutable.Set<K> findSubKeysExcept(K key, scala.collection.immutable.Vector<SubclassifiedIndex.Nonroot<K,V>> except)
key
- (undocumented)except
- (undocumented)
protected scala.collection.immutable.Set<K> innerFindSubKeys(K key, scala.collection.immutable.Vector<SubclassifiedIndex.Nonroot<K,V>> except)
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |