public abstract class BranchNode extends AbstractExprNode
| Modifier and Type | Field and Description |
|---|---|
protected List<ExprNode> |
children
child node list for this branch node
|
annotations, assertionType| Modifier | Constructor and Description |
|---|---|
protected |
BranchNode(AssertionType assertionType)
Creates a BranchNode using a logical operator.
|
protected |
BranchNode(AssertionType assertionType,
ExprNode... childList)
Creates a BranchNode using a logical operator and a list of children.
|
protected |
BranchNode(AssertionType assertionType,
List<ExprNode> childList)
Creates a BranchNode using a logical operator and a list of children.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
accept(FilterVisitor visitor)
Element/node accept method for visitor pattern.
|
void |
addNode(ExprNode node)
Adds a child node to this branch node node
|
void |
addNodeToHead(ExprNode node)
Adds a child node to this branch node at the head rather than the tail.
|
ExprNode |
clone()
Makes a full clone in new memory space of the current node and children
|
boolean |
equals(Object other) |
List<ExprNode> |
getChildren()
Gets the children below this BranchNode.
|
ExprNode |
getFirstChild()
Convenience method that gets the first child in the children array.
|
int |
hashCode() |
boolean |
isLeaf()
Tests to see if this node is a leaf or branch node.
|
boolean |
isSchemaAware()
Tells if this Node is Schema aware.
|
void |
setChildren(List<ExprNode> list)
Sets the list of children under this node.
|
get, getAnnotations, getAssertionType, printRefinementToBuffer, set, toStringprotected BranchNode(AssertionType assertionType, List<ExprNode> childList)
assertionType - the node's typechildList - the child nodes under this branch node.protected BranchNode(AssertionType assertionType, ExprNode... childList)
assertionType - the node's typechildList - the child nodes under this branch node.protected BranchNode(AssertionType assertionType)
assertionType - the node's typepublic final boolean isLeaf()
ExprNodeExprNode.isLeaf()public ExprNode clone()
clone in interface ExprNodeclone in class AbstractExprNodepublic void addNode(ExprNode node)
node - the child expression to add to this branch nodepublic void addNodeToHead(ExprNode node)
node - the child expression to add to this branch nodepublic List<ExprNode> getChildren()
public void setChildren(List<ExprNode> list)
list - the list of children to set.public ExprNode getFirstChild()
( ExprNode ) m_children.get( 0 ) public final Object accept(FilterVisitor visitor)
ExprNodevisitor - the filter expression tree structure visitorExprNode.accept(
FilterVisitor)public boolean isSchemaAware()
public int hashCode()
hashCode in class AbstractExprNodeObject.hashCode()public boolean equals(Object other)
equals in class AbstractExprNodetrue if both objects are equalObject.equals(java.lang.Object)Copyright © 2003–2019 The Apache Software Foundation. All rights reserved.