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

java.lang.Object
  extended by org.apache.directory.shared.ldap.filter.AbstractExprNode
      extended by org.apache.directory.shared.ldap.filter.LeafNode
All Implemented Interfaces:
ExprNode
Direct Known Subclasses:
ExtensibleNode, PresenceNode, SimpleNode, SubstringNode

public class LeafNode
extends AbstractExprNode

Abstract base class for leaf nodes within the expression filter tree.

Version:
$Rev: 664290 $
Author:
Apache Directory Project

Field Summary
 
Fields inherited from class org.apache.directory.shared.ldap.filter.AbstractExprNode
annotations, assertionType
 
Constructor Summary
protected LeafNode(java.lang.String attribute, AssertionType assertionType)
          Creates a leaf node.
 
Method Summary
 java.lang.Object accept(FilterVisitor visitor)
          Element/node accept method for visitor pattern.
 boolean equals(java.lang.Object other)
           
 java.lang.String getAttribute()
          Gets the attribute this leaf node is based on.
 int hashCode()
           
 boolean isLeaf()
          Gets whether this node is a leaf - the answer is always true here.
 void setAttribute(java.lang.String attribute)
          Sets the attribute this leaf node is based on.
 
Methods inherited from class org.apache.directory.shared.ldap.filter.AbstractExprNode
get, getAnnotations, getAssertionType, printRefinementToBuffer, set, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LeafNode

protected LeafNode(java.lang.String attribute,
                   AssertionType assertionType)
Creates a leaf node.

Parameters:
attribute - the attribute this node is based on
assertionType - the type of this leaf node
Method Detail

isLeaf

public final boolean isLeaf()
Gets whether this node is a leaf - the answer is always true here.

Specified by:
isLeaf in interface ExprNode
Specified by:
isLeaf in class AbstractExprNode
Returns:
true always

getAttribute

public final java.lang.String getAttribute()
Gets the attribute this leaf node is based on.

Returns:
the attribute asserted

setAttribute

public void setAttribute(java.lang.String attribute)
Sets the attribute this leaf node is based on.

Parameters:
attribute - the attribute that is asserted by this filter node

accept

public final 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)

hashCode

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

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class AbstractExprNode
Returns:
true if both objects are equal
See Also:
Object.equals(Object)


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.