|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.ontopia.utils.ChainedIndex<K,E>
public class ChainedIndex<K,E>
INTERNAL: A lookup index that delegates LookupIndexIF calls to chains of LookupIndexIFs.
get(key) returns the first non-null value returned from a getter.
put(key) removes the key from all putters.
remove(key) removes the key from all removers.
Field Summary | |
---|---|
protected LookupIndexIF<K,E>[] |
getters
|
protected int |
gsize
|
protected E |
missvalue
|
protected int |
psize
|
protected LookupIndexIF<K,E>[] |
putters
|
protected LookupIndexIF<K,E>[] |
removers
|
protected int |
rsize
|
Constructor Summary | |
---|---|
ChainedIndex(LookupIndexIF<K,E>[] chain)
|
|
ChainedIndex(LookupIndexIF<K,E>[] getters,
LookupIndexIF<K,E> setter)
|
|
ChainedIndex(LookupIndexIF<K,E>[] getters,
LookupIndexIF<K,E>[] setters)
|
|
ChainedIndex(LookupIndexIF<K,E>[] getters,
LookupIndexIF<K,E>[] putters,
LookupIndexIF<K,E>[] removers)
|
|
ChainedIndex(LookupIndexIF<K,E> getter,
LookupIndexIF<K,E>[] setters)
|
Method Summary | |
---|---|
E |
get(K key)
|
java.lang.Object |
getMissValue()
INTERNAL: Gets the missvalue member, which is used to decide whether an index lookup missed or not. |
E |
put(K key,
E value)
|
E |
remove(K key)
|
void |
setMissValue(E missvalue)
INTERNAL: Sets the missvalue member, which is used to decide whether an index lookup missed or not. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected LookupIndexIF<K,E>[] getters
protected LookupIndexIF<K,E>[] putters
protected LookupIndexIF<K,E>[] removers
protected int gsize
protected int psize
protected int rsize
protected E missvalue
Constructor Detail |
---|
public ChainedIndex(LookupIndexIF<K,E>[] chain)
public ChainedIndex(LookupIndexIF<K,E>[] getters, LookupIndexIF<K,E>[] setters)
public ChainedIndex(LookupIndexIF<K,E> getter, LookupIndexIF<K,E>[] setters)
public ChainedIndex(LookupIndexIF<K,E>[] getters, LookupIndexIF<K,E> setter)
public ChainedIndex(LookupIndexIF<K,E>[] getters, LookupIndexIF<K,E>[] putters, LookupIndexIF<K,E>[] removers)
Method Detail |
---|
public E get(K key)
get
in interface LookupIndexIF<K,E>
public java.lang.Object getMissValue()
public void setMissValue(E missvalue)
public E put(K key, E value)
put
in interface LookupIndexIF<K,E>
public E remove(K key)
remove
in interface LookupIndexIF<K,E>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |