public static class RowTree.Node extends Object
Represents a single node or a RowTree
. You can traverse the tree up/down/left/right from a single node.
A node may be "unplugged", in which case its getParent()
is null. (Root nodes have RowTree's super-root as
the parent.)
Public methods of Node
are provided for traveral. All modifications should be done through RowTree
.
Modifier and Type | Method and Description |
---|---|
void |
addFlags(int flagMask)
Sets flags by mask.
|
StringBuilder |
append(StringBuilder sb) |
void |
collectDirectChildren(LongCollector collector)
Retrieves all direct children of the node
|
RowTree.Node |
findFirstWithFlags(int flags)
Starting with this node and going into its sub-tree, tries to find the first node that has the specified
flags set.
|
RowTree.Node |
getFirstChild() |
RowTree.Node |
getLastChild() |
RowTree.Node |
getNextSibling() |
RowTree.Node |
getParent() |
RowTree.Node |
getPrevSibling() |
long |
getRowId() |
boolean |
hasFlags(int flagMask)
Bitwise flag check.
|
String |
toFullString() |
String |
toString() |
void |
writeTo(LongCollector rows,
IntCollector depths,
int depth)
Dumps the sub-tree rooted at this node as parallel lists of rows and depths, to be later used
as parameters for
ArrayForest . |
public String toFullString()
public StringBuilder append(StringBuilder sb)
public long getRowId()
public boolean hasFlags(int flagMask)
flagMask
- maskpublic void addFlags(int flagMask)
flagMask
- maskpublic RowTree.Node getParent()
public RowTree.Node getFirstChild()
public RowTree.Node getLastChild()
public RowTree.Node getNextSibling()
public RowTree.Node getPrevSibling()
public void writeTo(LongCollector rows, IntCollector depths, int depth)
ArrayForest
.rows
- rows recipientdepths
- depths recipientdepth
- starting depth for this node; if -1, this is a special case: this node is a super-root and
must not write out its row ID (which is 0), but should proceed writing out children.public void collectDirectChildren(LongCollector collector)
collector
- recipient for row IDspublic RowTree.Node findFirstWithFlags(int flags)
flags
- flags to look forCopyright © 2024 Tempo Software. All Rights Reserved.