Class AssertionNode
- java.lang.Object
-
- org.apache.directory.api.ldap.model.filter.AbstractExprNode
-
- org.apache.directory.api.ldap.model.filter.AssertionNode
-
public abstract class AssertionNode extends AbstractExprNode
Node used for the application of arbitrary predicates on return candidates. Applies dynamic and programatic criteria for the selection of candidates for return. Nodes of this type may be introduced into the filter expression to provided the opportunity to constrain the search further without altering the search algorithm.- Author:
- Apache Directory Project
-
-
Field Summary
-
Fields inherited from class org.apache.directory.api.ldap.model.filter.AbstractExprNode
annotations, assertionType
-
-
Constructor Summary
Constructors Constructor Description AssertionNode(Assertion assertion)Creates an AssertionNode using an arbitrary candidate assertion.AssertionNode(Assertion assertion, String desc)Creates an AssertionNode using an arbitrary candidate assertion with a descriptions used for filter AST walker dumps.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectaccept(FilterVisitor visitor)Element/node accept method for visitor pattern.booleanequals(Object obj)AssertiongetAssertion()Gets the Assertion used by this assertion node.inthashCode()booleanisLeaf()Always returns true since an AssertionNode has no children.booleanisSchemaAware()Tells if this Node is Schema aware.StringBuilderprintRefinementToBuffer(StringBuilder buf)Default implementation for this method : just throw an exception.StringtoString()-
Methods inherited from class org.apache.directory.api.ldap.model.filter.AbstractExprNode
clone, get, getAnnotations, getAssertionType, set
-
-
-
-
Constructor Detail
-
AssertionNode
public AssertionNode(Assertion assertion)
Creates an AssertionNode using an arbitrary candidate assertion.- Parameters:
assertion- the arbitrary selection logic.
-
-
Method Detail
-
getAssertion
public Assertion getAssertion()
Gets the Assertion used by this assertion node.- Returns:
- the assertion used by this node
-
isLeaf
public boolean isLeaf()
Always returns true since an AssertionNode has no children.- Returns:
- true if the node is a leaf,false otherwise
- See Also:
ExprNode.isLeaf()
-
printRefinementToBuffer
public StringBuilder printRefinementToBuffer(StringBuilder buf)
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
- See Also:
ExprNode.printRefinementToBuffer(StringBuilder)
-
isSchemaAware
public boolean isSchemaAware()
Tells if this Node is Schema aware.- Returns:
- true if the Node is SchemaAware
-
equals
public boolean equals(Object obj)
- Overrides:
equalsin classAbstractExprNode- Returns:
trueif both objects are equal- See Also:
Object.equals(Object)
-
hashCode
public int hashCode()
- Overrides:
hashCodein classAbstractExprNode- Returns:
- the instance's hash code
- See Also:
Object.hashCode()
-
accept
public Object accept(FilterVisitor visitor)
Description copied from interface:ExprNodeElement/node accept method for visitor pattern.- Parameters:
visitor- the filter expression tree structure visitor- Returns:
- the modified element
- See Also:
ExprNode.accept( FilterVisitor)
-
toString
public String toString()
- Overrides:
toStringin classAbstractExprNode- Returns:
- A string representing the AndNode
- See Also:
Object.toString()
-
-