xxl.indexStructures
Class Tree.IndexEntry

java.lang.Object
  |
  +--xxl.indexStructures.Tree.IndexEntry
Direct Known Subclasses:
ORTree.IndexEntry

public class Tree.IndexEntry
extends java.lang.Object

An IndexEntry is a non-leaf node. It references nodes of level+1.


Field Summary
protected  java.lang.Object id
          The handle used to lookup the Node in its Container.
 
Constructor Summary
Tree.IndexEntry()
           
 
Method Summary
protected  Tree.IndexEntry chooseSubtree(Tree.Descriptor descriptor, java.util.Stack path)
           
protected  Container container(int level)
           
protected  Tree.Node get(int parentLevel, boolean unfix)
           
protected  void growAndPost(java.lang.Object data, java.util.Stack path)
           
 int hashCode()
          Returns id.hashCode().
 java.lang.Object id()
           
protected  Tree.IndexEntry initialize(Container container, java.lang.Object id, Tree.Node.SplitInfo splitInfo)
          Creates an index entry for a new node (enclosing object of splitInfo).
 Tree.IndexEntry initialize(java.lang.Object id)
          Creates a new IndexEntry.
protected  int level(int parentLevel)
           
protected  void update(Tree.Node node, boolean unfix)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

protected java.lang.Object id
The handle used to lookup the Node in its Container.
Constructor Detail

Tree.IndexEntry

public Tree.IndexEntry()
Method Detail

initialize

public Tree.IndexEntry initialize(java.lang.Object id)
Creates a new IndexEntry.

initialize

protected Tree.IndexEntry initialize(Container container,
                                     java.lang.Object id,
                                     Tree.Node.SplitInfo splitInfo)
Creates an index entry for a new node (enclosing object of splitInfo). Note that this function is a factory method. This means, if indexEntry is extended in a subclass you have to overwrite this function.
Parameters:
Node.splitInfo - contains information on the new node (if node is the root-node splitInfo.path.isEmpty() == true).
id - the id created by container.reserve and used to access the node

id

public java.lang.Object id()

hashCode

public int hashCode()
Returns id.hashCode().
Overrides:
hashCode in class java.lang.Object

level

protected int level(int parentLevel)

container

protected Container container(int level)

get

protected Tree.Node get(int parentLevel,
                        boolean unfix)

update

protected void update(Tree.Node node,
                      boolean unfix)

chooseSubtree

protected Tree.IndexEntry chooseSubtree(Tree.Descriptor descriptor,
                                        java.util.Stack path)

growAndPost

protected void growAndPost(java.lang.Object data,
                           java.util.Stack path)