public class NotNode extends BranchNode
Constructor and Description |
---|
NotNode()
Creates an empty NotNode
|
NotNode(ExprNode child)
Creates a NotNode using a logical NOT operator and the given child.
|
NotNode(List<ExprNode> childList)
Creates a NotNode using a logical NOT operator and a list of children.
|
Modifier and Type | Method and Description |
---|---|
void |
addNode(ExprNode node)
Adds a child node to this NOT node node
|
void |
addNodeToHead(ExprNode node)
Adds a child node to this NOT node at the head rather than the tail.
|
AssertionType |
getOperator()
Gets the operator for this branch node.
|
boolean |
isConjunction()
Tests whether or not this node is a conjunction (a AND'ed branch).
|
boolean |
isDisjunction()
Tests whether or not this node is a disjunction (a OR'ed branch).
|
boolean |
isNegation()
Tests whether or not this node is a negation (a NOT'ed branch).
|
StringBuilder |
printRefinementToBuffer(StringBuilder buf)
Default implementation for this method : just throw an exception.
|
void |
setChildren(List<ExprNode> childList)
Sets the list of children under this node.
|
String |
toString()
Gets the recursive prefix string represent of the filter from this node
down.
|
accept, clone, equals, getChildren, getFirstChild, hashCode, isLeaf
get, getAssertionType, isSchemaAware, set
public NotNode(List<ExprNode> childList)
childList
- the child nodes under this branch node.public NotNode(ExprNode child)
child
- the child node under this branch node.public NotNode()
public void addNode(ExprNode node)
addNode
in class BranchNode
node
- the child expression to add to this NOT nodepublic void addNodeToHead(ExprNode node)
addNodeToHead
in class BranchNode
node
- the child expression to add to this branch nodepublic void setChildren(List<ExprNode> childList)
setChildren
in class BranchNode
childList
- the list of children to set.public AssertionType getOperator()
public boolean isDisjunction()
public boolean isConjunction()
public boolean isNegation()
public StringBuilder printRefinementToBuffer(StringBuilder buf)
AbstractExprNode
printRefinementToBuffer
in interface ExprNode
printRefinementToBuffer
in class AbstractExprNode
buf
- The buffer where we store the resultUnsupportedOperationException
- if this node isn't a part of a refinement.ExprNode.printRefinementToBuffer(StringBuilder)
public String toString()
toString
in class AbstractExprNode
Object.toString()
Copyright © 2003–2018 The Apache Software Foundation. All rights reserved.