|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.basex.index.IndexTree
public class IndexTree
This class indexes keys in a balanced binary tree, including their id values. Iterator methods are available to traverse through the tree.
Field Summary | |
---|---|
protected int |
cn
Current iterator node. |
protected static double |
FACTOR
Factor for resize. |
TokenList |
keys
Keys saved in the tree. |
protected TokenIntMap |
maps
Mapping for using existing tree. |
TokenList |
values
Compressed id values. |
Constructor Summary | |
---|---|
IndexTree()
|
Method Summary | |
---|---|
void |
index(byte[] key,
int value)
Indexes the specified key and value. |
protected int |
index(byte[] key,
int value,
boolean exist)
Indexes the specified key and value. |
void |
init()
Initializes the index iterator. |
boolean |
more()
Checks if the iterator returns more keys. |
int |
next()
Returns the next pointer. |
int |
size()
Returns the number of entries. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final double FACTOR
public final TokenList keys
public TokenList values
protected TokenIntMap maps
protected int cn
Constructor Detail |
---|
public IndexTree()
Method Detail |
---|
public final void index(byte[] key, int value)
key
- key to be indexedvalue
- value to be indexesprotected final int index(byte[] key, int value, boolean exist)
key
- key to be indexedvalue
- value to be indexedexist
- flag for using existing index
public final int size()
public final void init()
public final boolean more()
public final int next()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |