org.apache.directory.shared.ldap.filter
Class AssertionNode

java.lang.Object
  extended by org.apache.directory.shared.ldap.filter.AbstractExprNode
      extended by org.apache.directory.shared.ldap.filter.AssertionNode
All Implemented Interfaces:
ExprNode

public 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.

Version:
$Revision: 656886 $
Author:
Apache Directory Project

Field Summary
 
Fields inherited from class org.apache.directory.shared.ldap.filter.AbstractExprNode
annotations, assertionType
 
Constructor Summary
AssertionNode(Assertion assertion)
          Creates an AssertionNode using an arbitrary candidate assertion.
AssertionNode(Assertion assertion, java.lang.String desc)
          Creates an AssertionNode using an arbitrary candidate assertion with a descriptions used for filter AST walker dumps.
 
Method Summary
 java.lang.Object accept(FilterVisitor visitor)
          Element/node accept method for visitor pattern.
 Assertion getAssertion()
          Gets the Assertion used by this assertion node.
 int hashCode()
           
 boolean isLeaf()
          Always returns true since an AssertionNode has no children.
 java.lang.String toString()
           
 
Methods inherited from class org.apache.directory.shared.ldap.filter.AbstractExprNode
equals, get, getAnnotations, getAssertionType, printRefinementToBuffer, set
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AssertionNode

public AssertionNode(Assertion assertion)
Creates an AssertionNode using an arbitrary candidate assertion.

Parameters:
assertion - the arbitrary selection logic.

AssertionNode

public AssertionNode(Assertion assertion,
                     java.lang.String desc)
Creates an AssertionNode using an arbitrary candidate assertion with a descriptions used for filter AST walker dumps.

Parameters:
assertion - the arbitrary selection logic.
desc - the printout representation for filter prints.
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.

Specified by:
isLeaf in interface ExprNode
Specified by:
isLeaf in class AbstractExprNode
Returns:
true if the node is a leaf,false otherwise
See Also:
ExprNode.isLeaf()

hashCode

public int hashCode()
Overrides:
hashCode in class AbstractExprNode
Returns:
the instance's hash code
See Also:
Object.hashCode()

accept

public java.lang.Object accept(FilterVisitor visitor)
Description copied from interface: ExprNode
Element/node accept method for visitor pattern.

Parameters:
visitor - the filter expression tree structure visitor
Returns:
The modified element
See Also:
ExprNode.accept( org.apache.directory.shared.ldap.filter.FilterVisitor)

toString

public java.lang.String toString()
Overrides:
toString in class AbstractExprNode
Returns:
A string representing the AndNode
See Also:
Object.toString()


Copyright © 2004-2008 The Apache Software Foundation. All Rights Reserved.