org.helidb.util.bplus
Class BPlusTreeLeafNode<K,V>
java.lang.Object
org.helidb.util.bplus.AbstractBPlusTreeNode<K,V>
org.helidb.util.bplus.BPlusTreeLeafNode<K,V>
- Type Parameters:
K
- The type of keys in the tree.V
- The type of values in the tree.
- All Implemented Interfaces:
- BPlusTreeNode<K,V>
public final class BPlusTreeLeafNode<K,V>
- extends AbstractBPlusTreeNode<K,V>
A leaf node.
- Since:
- 1.0
- Author:
- Karl Gustafsson
- In_jar:
- helidb-core
Constructor Summary |
BPlusTreeLeafNode(long position,
List<KeyAndValue<K,V>> records,
boolean rootNode,
boolean full)
Create a leaf node without pointers to adjacent leaf nodes. |
BPlusTreeLeafNode(long position,
List<KeyAndValue<K,V>> records,
boolean rootNode,
boolean full,
Long leafNodeToTheLeftPointer,
Long leafNodeToTheRightPointer)
Create a leaf node with pointers to adjacent leaf nodes. |
BPlusTreeLeafNode
public BPlusTreeLeafNode(long position,
List<KeyAndValue<K,V>> records,
boolean rootNode,
boolean full)
- Create a leaf node without pointers to adjacent leaf nodes.
- Parameters:
position
- The position of the node in the node repository.records
- The node's records.rootNode
- true
if this node is the root node of the tree.full
- true
if this node is full.
BPlusTreeLeafNode
public BPlusTreeLeafNode(long position,
List<KeyAndValue<K,V>> records,
boolean rootNode,
boolean full,
Long leafNodeToTheLeftPointer,
Long leafNodeToTheRightPointer)
- Create a leaf node with pointers to adjacent leaf nodes.
- Parameters:
position
- The position of the node in the node repository.records
- The node's records.rootNode
- true
if this node is the root node of the tree.full
- true
if this node is full.leafNodeToTheLeftPointer
- Pointer to the leaf node to the left of
this node. Keys there have lower values than keys in this node. This is
null
for the leftmost leaf node.leafNodeToTheRightPointer
- Pointer to the leaf node to the right of
this node. Keys there have higher values than keys in this node. This is
null
for the rightmost leaf node.
isLeafNode
public boolean isLeafNode()
- Description copied from interface:
BPlusTreeNode
- Is the node a leaf node?
- Returns:
true
, always.
hasPointersToAdjacentNodes
public boolean hasPointersToAdjacentNodes()
getLeafNodeToTheLeftPointer
public Long getLeafNodeToTheLeftPointer()
setLeafNodeToTheLeftPointer
public void setLeafNodeToTheLeftPointer(Long ptr)
getLeafNodeToTheRightPointer
public Long getLeafNodeToTheRightPointer()
setLeafNodeToTheRightPointer
public void setLeafNodeToTheRightPointer(Long ptr)
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