Package org.roaringbitmap.art
Class AbstractShuttle
java.lang.Object
org.roaringbitmap.art.AbstractShuttle
- All Implemented Interfaces:
Shuttle
- Direct Known Subclasses:
BackwardShuttle,ForwardShuttle
visit the art tree's space through a stack which records the deep first visiting paths.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Artprotected Containersprotected intprotected booleanprotected static intprotected org.roaringbitmap.art.AbstractShuttle.NodeEntry[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract intboundaryNodePosition(Node node, boolean inRunDirection)protected abstract booleancurrentBeforeHigh(byte[] current, byte[] high)get the current LeafNode after calling the method moveToNextLeafvoidshould be called firstly before calling other methodsvoidinitShuttleFrom(long key)Call this instead of initShuttle, if the iterator should start from a bound (upper/lower depending on direction)booleanprotected abstract booleanprefixMismatchIsInRunDirection(byte nodeValue, byte highValue)voidremove()remove the current visiting LeafNode and its corresponding value containerprotected abstract intsearchMissNextPosition(org.roaringbitmap.art.SearchResult result)protected abstract intvisitedNodeNextPosition(Node node, int pos)
-
Field Details
-
MAX_DEPTH
protected static final int MAX_DEPTH- See Also:
- Constant Field Values
-
stack
protected org.roaringbitmap.art.AbstractShuttle.NodeEntry[] stack -
depth
protected int depth -
hasRun
protected boolean hasRun -
art
-
containers
-
-
Constructor Details
-
AbstractShuttle
-
-
Method Details
-
initShuttle
public void initShuttle()Description copied from interface:Shuttleshould be called firstly before calling other methods- Specified by:
initShuttlein interfaceShuttle
-
initShuttleFrom
public void initShuttleFrom(long key)Description copied from interface:ShuttleCall this instead of initShuttle, if the iterator should start from a bound (upper/lower depending on direction)- Specified by:
initShuttleFromin interfaceShuttle- Parameters:
key- the upper/lower bound to start from
-
currentBeforeHigh
protected abstract boolean currentBeforeHigh(byte[] current, byte[] high) -
moveToNextLeaf
public boolean moveToNextLeaf()- Specified by:
moveToNextLeafin interfaceShuttle- Returns:
- true: has a LeafNode, false: has no LeafNode
-
visitedNodeNextPosition
-
getCurrentLeafNode
Description copied from interface:Shuttleget the current LeafNode after calling the method moveToNextLeaf- Specified by:
getCurrentLeafNodein interfaceShuttle- Returns:
- the current visiting LeafNode
-
remove
public void remove()Description copied from interface:Shuttleremove the current visiting LeafNode and its corresponding value container -
boundaryNodePosition
-
prefixMismatchIsInRunDirection
protected abstract boolean prefixMismatchIsInRunDirection(byte nodeValue, byte highValue) -
searchMissNextPosition
protected abstract int searchMissNextPosition(org.roaringbitmap.art.SearchResult result)
-