| Constructor and Description |
|---|
InnerNode()
Creates a new inner node with no children and threshold set to 0.
|
InnerNode(java.util.ArrayList<TreeNode> children,
java.lang.Integer threshold)
Creates a new inner node with the given children and trreshold.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addChild(TreeNode child)
Appends a child to the children of this node.
|
java.util.ArrayList<TreeNode> |
getChildren() |
int |
getNumberOfChildren()
Returns the number of children of this node.
|
int |
getThreshold()
Returns the threshold value of this node.
|
<F> F |
performVisitor(Visitor<F> visitor)
Visits the threshold tree represented by this inner node in pre-order.
|
void |
setThreshold(java.lang.Integer threshold) |
java.lang.String |
toString() |
public InnerNode()
public InnerNode(java.util.ArrayList<TreeNode> children, java.lang.Integer threshold)
children - the children of this inner nodethreshold - the threshold of this nodepublic void addChild(TreeNode child)
child - the child to addpublic java.util.ArrayList<TreeNode> getChildren()
public int getNumberOfChildren()
TreeNodegetNumberOfChildren in interface TreeNodepublic int getThreshold()
TreeNodegetThreshold in interface TreeNodepublic <F> F performVisitor(Visitor<F> visitor) throws WrongAccessStructureException
For each child, a new visitor is created via Visitor.getVisitorForNextChild() which is
used to visit the child.
The result of those visits are then used to calculate the result of the visitor vising this node.
performVisitor in interface TreeNodeF - the return result of the visitorvisitor - the visitor to useWrongAccessStructureException - if something is wrong with the access structure being traversedpublic void setThreshold(java.lang.Integer threshold)
public java.lang.String toString()
toString in class java.lang.Object