public class BTreeLocation<USERKEY,STOREKEY> extends java.lang.Object implements java.lang.Comparable<BTreeLocation<USERKEY,STOREKEY>>
| Modifier and Type | Field and Description |
|---|---|
int |
index |
Node<USERKEY,STOREKEY> |
node |
NodeStore<USERKEY,STOREKEY,?> |
nodeStore |
BTreeLocation<USERKEY,STOREKEY> |
prev
The previous state (not the previous tree node).
|
boolean |
subtreeHasNext |
boolean |
subtreeHasPrev |
| Constructor and Description |
|---|
BTreeLocation(BTreeLocation<USERKEY,STOREKEY> loc)
Copy constructor.
|
BTreeLocation(BTreeLocation<USERKEY,STOREKEY> prev,
Node<USERKEY,STOREKEY> node,
int index) |
BTreeLocation(NodeStore<USERKEY,STOREKEY,?> nodeStore,
Node<USERKEY,STOREKEY> node,
int index) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(BTreeLocation<USERKEY,STOREKEY> that) |
BTreeLocation<USERKEY,STOREKEY> |
descend() |
BTreeLocation<USERKEY,STOREKEY> |
descend(int child)
Push the current state and step into the given child.
|
USERKEY |
getKey()
Return the current STOREKEY to the user data.
|
Node<USERKEY,STOREKEY> |
getNode()
Return the current Node.
|
BTreeLocation<USERKEY,STOREKEY> |
go(int index)
Set the index to this value and return this.
|
boolean |
hasNext() |
boolean |
hasPrev() |
BTreeLocation<USERKEY,STOREKEY> |
leftChild() |
BTreeLocation<USERKEY,STOREKEY> |
leftData() |
BTreeLocation<USERKEY,STOREKEY> |
max()
Return the maximum location for this subtree location.
|
BTreeLocation<USERKEY,STOREKEY> |
min()
Return the minimum location for this subtree location.
|
BTreeLocation<USERKEY,STOREKEY> |
next()
May never be called unless
hasNext() is true. |
BTreeLocation<USERKEY,STOREKEY> |
prev() |
BTreeLocation<USERKEY,STOREKEY> |
rightChild() |
BTreeLocation<USERKEY,STOREKEY> |
rightData() |
void |
setSubtreeHasNext()
Set hasNext using local information about if there
is another available datalement in this subtree.
|
void |
setSubtreeHasPrev()
Set hasPrev using local node information only.
|
public BTreeLocation<USERKEY,STOREKEY> prev
public int index
public boolean subtreeHasNext
public boolean subtreeHasPrev
public BTreeLocation(NodeStore<USERKEY,STOREKEY,?> nodeStore, Node<USERKEY,STOREKEY> node, int index)
public BTreeLocation(BTreeLocation<USERKEY,STOREKEY> prev, Node<USERKEY,STOREKEY> node, int index)
public BTreeLocation(BTreeLocation<USERKEY,STOREKEY> loc)
public int compareTo(BTreeLocation<USERKEY,STOREKEY> that)
compareTo in interface java.lang.Comparable<BTreeLocation<USERKEY,STOREKEY>>public boolean hasPrev()
public boolean hasNext()
public BTreeLocation<USERKEY,STOREKEY> next()
public BTreeLocation<USERKEY,STOREKEY> prev()
public void setSubtreeHasNext()
public void setSubtreeHasPrev()
public USERKEY getKey()
public BTreeLocation<USERKEY,STOREKEY> leftChild()
public BTreeLocation<USERKEY,STOREKEY> leftData()
public BTreeLocation<USERKEY,STOREKEY> rightChild()
public BTreeLocation<USERKEY,STOREKEY> rightData()
public BTreeLocation<USERKEY,STOREKEY> go(int index)
public BTreeLocation<USERKEY,STOREKEY> descend(int child)
public BTreeLocation<USERKEY,STOREKEY> descend()
public BTreeLocation<USERKEY,STOREKEY> min()
public BTreeLocation<USERKEY,STOREKEY> max()