Package org.pkl.core.util.paguro
Interface RrbTree.Node<T>
- All Superinterfaces:
org.organicdesign.fp.indent.Indented
protected static interface RrbTree.Node<T>
extends org.organicdesign.fp.indent.Indented
-
Method Summary
Modifier and TypeMethodDescriptionaddEndChild(boolean leftMost, RrbTree.Node<T> shorter) Adds a node as the first/leftmost or last/rightmost childaddEndChildren(boolean leftMost, RrbTree.Node<T>[] newKids) Adds kids as leftmost or rightmost of current childrenchild(int childIdx) Returns the immediate child node at the given index.endChild(boolean leftMost) Returns the leftMost (first) or right-most (last) childget(int i) Return the item at the given indexbooleanhasRelaxedCapacity(int index, int size) Can we put focus at the given index without reshuffling nodes?intheight()Returns the maximum depth below this node.intReturns the number of immediate children of this node, not all descendants.intsize()Number of items stored in this nodesplitAt(int splitIndex) booleanthisNodeHasRelaxedCapacity(int numItems) Can this node take the specified number of children?Methods inherited from interface org.organicdesign.fp.indent.Indented
indentedStr
-
Method Details
-
child
Returns the immediate child node at the given index. -
endChild
Returns the leftMost (first) or right-most (last) child -
addEndChild
Adds a node as the first/leftmost or last/rightmost child -
addEndChildren
Adds kids as leftmost or rightmost of current children -
get
Return the item at the given index -
height
int height()Returns the maximum depth below this node. Leaf nodes are height 1. -
size
int size()Number of items stored in this node -
thisNodeHasRelaxedCapacity
boolean thisNodeHasRelaxedCapacity(int numItems) Can this node take the specified number of children? -
hasRelaxedCapacity
boolean hasRelaxedCapacity(int index, int size) Can we put focus at the given index without reshuffling nodes?- Parameters:
index- the index we want to insert atsize- the number of items to insert. Must be size invalid input: '<' MAX_NODE_LENGTH- Returns:
- true if we can do so without otherwise adjusting the tree.
-
numChildren
int numChildren()Returns the number of immediate children of this node, not all descendants. -
pushFocus
-
replace
-
splitAt
-