org.helidb.util.bplus
Class BPlusTreeNonLeafNode<K>
java.lang.Object
org.helidb.util.bplus.AbstractBPlusTreeNode<K,Long>
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
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?
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