org.helidb.util.bplus
Class BPlusTreeNonLeafNode<K>

java.lang.Object
  extended by org.helidb.util.bplus.AbstractBPlusTreeNode<K,Long>
      extended by org.helidb.util.bplus.BPlusTreeNonLeafNode<K>
Type Parameters:
K - The type of keys in the tree.
All Implemented Interfaces:
BPlusTreeNode<K,Long>

public final class BPlusTreeNonLeafNode<K>
extends AbstractBPlusTreeNode<K,Long>

A non-leaf node in a B+ Tree. The values of a non-leaf node's records are Long pointers to child nodes.

Since:
1.0
Author:
Karl Gustafsson
In_jar:
helidb-core

Constructor Summary
BPlusTreeNonLeafNode(long position, K keyForFirstPointer, long firstPointer, List<KeyAndValue<K,Long>> records, boolean rootNode, boolean full)
          Create a non-leaf node.
 
Method Summary
 boolean equals(Object o)
           
 long getFirstPointer()
           
 K getKeyForFirstPointer()
           
 int hashCode()
           
 boolean isLeafNode()
          Is the node a leaf node?
 void setFirstPointer(long p)
           
 void setKeyForFirstPointer(K key)
           
 String toString()
           
 
Methods inherited from class org.helidb.util.bplus.AbstractBPlusTreeNode
getPosition, getRecords, isFull, isRoot, setFull
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BPlusTreeNonLeafNode

public BPlusTreeNonLeafNode(long position,
                            K keyForFirstPointer,
                            long firstPointer,
                            List<KeyAndValue<K,Long>> records,
                            boolean rootNode,
                            boolean full)
Create a non-leaf node.

Parameters:
position - The position of the node.
keyForFirstPointer - The key for the node's leftmost child node. This is null for the leftmost nodes at any level of the tree, including the root node.
firstPointer - The pointer to the leftmost child node.
records - The node's records. (Keys and pointers to child nodes.)
rootNode - Is this node the tree's root node?
full - Is this node full?
Method Detail

isLeafNode

public boolean isLeafNode()
Description copied from interface: BPlusTreeNode
Is the node a leaf node?

Returns:
false, always.

getFirstPointer

public long getFirstPointer()

setFirstPointer

public void setFirstPointer(long p)

getKeyForFirstPointer

public K getKeyForFirstPointer()

setKeyForFirstPointer

public void setKeyForFirstPointer(K key)

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object