Class NotNode
java.lang.Object
org.apache.directory.api.ldap.model.filter.AbstractExprNode
org.apache.directory.api.ldap.model.filter.BranchNode
org.apache.directory.api.ldap.model.filter.NotNode
Node representing an Not connector in a filter operation
- Author:
- Apache Directory Project
-
Field Summary
Fields inherited from class BranchNode
childrenFields inherited from class AbstractExprNode
annotations, assertionType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a child node to this NOT node nodevoidaddNodeToHead(ExprNode node) Adds a child node to this NOT node at the head rather than the tail.Gets the operator for this branch node.booleanTests whether or not this node is a conjunction (a AND'ed branch).booleanTests whether or not this node is a disjunction (a OR'ed branch).booleanTests whether or not this node is a negation (a NOT'ed branch).Default implementation for this method : just throw an exception.voidsetChildren(List<ExprNode> childList) Sets the list of children under this node.toString()Gets the recursive prefix string represent of the filter from this node down.Methods inherited from class BranchNode
accept, clone, equals, getChildren, getFirstChild, hashCode, isLeaf, isSchemaAwareMethods inherited from class AbstractExprNode
get, getAnnotations, getAssertionType, set
-
Constructor Details
-
NotNode
-
NotNode
Creates a NotNode using a logical NOT operator and the given child.- Parameters:
child- the child node under this branch node.
-
NotNode
public NotNode()Creates an empty NotNode
-
-
Method Details
-
addNode
Adds a child node to this NOT node node- Overrides:
addNodein classBranchNode- Parameters:
node- the child expression to add to this NOT node
-
addNodeToHead
Adds a child node to this NOT node at the head rather than the tail.- Overrides:
addNodeToHeadin classBranchNode- Parameters:
node- the child expression to add to this branch node
-
setChildren
Sets the list of children under this node.- Overrides:
setChildrenin classBranchNode- Parameters:
childList- the list of children to set.
-
getOperator
Gets the operator for this branch node.- Returns:
- the operator constant.
-
isDisjunction
public boolean isDisjunction()Tests whether or not this node is a disjunction (a OR'ed branch).- Returns:
- true if the operation is a OR, false otherwise.
-
isConjunction
public boolean isConjunction()Tests whether or not this node is a conjunction (a AND'ed branch).- Returns:
- true if the operation is a AND, false otherwise.
-
isNegation
public boolean isNegation()Tests whether or not this node is a negation (a NOT'ed branch).- Returns:
- true if the operation is a NOT, false otherwise.
-
printRefinementToBuffer
Description copied from class:AbstractExprNodeDefault implementation for this method : just throw an exception.- Specified by:
printRefinementToBufferin interfaceExprNode- Overrides:
printRefinementToBufferin classAbstractExprNode- Parameters:
buf- the buffer to append to.- Returns:
- The buffer in which the refinement has been appended
- Throws:
UnsupportedOperationException- if this node isn't a part of a refinement.- See Also:
-
toString
Gets the recursive prefix string represent of the filter from this node down.- Overrides:
toStringin classAbstractExprNode- Returns:
- A string representing the AndNode
- See Also:
-