goldman.collection.ordered
Class AbstractSearchTree.TreeNode

java.lang.Object
  extended by goldman.collection.ordered.AbstractSearchTree.TreeNode
Direct Known Subclasses:
BinarySearchTree.BSTNode, BPlusTree.LeafNode
Enclosing class:
AbstractSearchTree<E>

protected abstract class AbstractSearchTree.TreeNode
extends Object


Constructor Summary
protected AbstractSearchTree.TreeNode()
           
 
Method Summary
protected abstract  int capacity()
           
protected abstract  AbstractSearchTree.TreeNode child(int index)
           
protected abstract  E data(int index)
           
protected abstract  boolean isFrontier()
           
protected abstract  int size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractSearchTree.TreeNode

protected AbstractSearchTree.TreeNode()
Method Detail

size

protected abstract int size()
Returns:
the number of elements held in that tree node

capacity

protected abstract int capacity()
Returns:
the maximum number of elements that are allowed in the tree node.

child

protected abstract AbstractSearchTree.TreeNode child(int index)
Parameters:
index - the index for the desired child
Returns:
the tree node reference for that child

data

protected abstract E data(int index)
Parameters:
index - the index of the desired element
Returns:
the element
Throws:
IllegalArgumentException - index < 0 or indexsize()

isFrontier

protected abstract boolean isFrontier()
Returns:
true if and only if the node is the frontier node