Package org.roaringbitmap.art
Class AbstractShuttle
- java.lang.Object
-
- org.roaringbitmap.art.AbstractShuttle
-
- All Implemented Interfaces:
Shuttle
- Direct Known Subclasses:
BackwardShuttle,ForwardShuttle
public abstract class AbstractShuttle extends java.lang.Object implements Shuttle
visit the art tree's space through a stack which records the deep first visiting paths.
-
-
Field Summary
Fields Modifier and Type Field Description protected Artartprotected Containerscontainersprotected intdepthprotected booleanhasRunprotected static intMAX_DEPTHprotected org.roaringbitmap.art.AbstractShuttle.NodeEntry[]stack
-
Constructor Summary
Constructors Constructor Description AbstractShuttle(Art art, Containers containers)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract intboundaryNodePosition(Node node)LeafNodegetCurrentLeafNode()get the current LeafNode after calling the method moveToNextLeafvoidinitShuttle()should be called firstly before calling other methodsbooleanmoveToNextLeaf()voidremove()remove the current visiting LeafNode and its corresponding value containerprotected abstract intvisitedNodeNextPosition(Node node, int pos)
-
-
-
Field Detail
-
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
protected Art art
-
containers
protected Containers containers
-
-
Constructor Detail
-
AbstractShuttle
public AbstractShuttle(Art art, Containers containers)
-
-
Method Detail
-
initShuttle
public void initShuttle()
Description copied from interface:Shuttleshould be called firstly before calling other methods- Specified by:
initShuttlein interfaceShuttle
-
moveToNextLeaf
public boolean moveToNextLeaf()
- Specified by:
moveToNextLeafin interfaceShuttle- Returns:
- true: has a LeafNode ,false: has no LeafNode
-
visitedNodeNextPosition
protected abstract int visitedNodeNextPosition(Node node, int pos)
-
getCurrentLeafNode
public LeafNode 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
protected abstract int boundaryNodePosition(Node node)
-
-