org.apache.directory.shared.ldap.filter
Class SimpleNode<T>

java.lang.Object
  extended by org.apache.directory.shared.ldap.filter.AbstractExprNode
      extended by org.apache.directory.shared.ldap.filter.LeafNode
          extended by org.apache.directory.shared.ldap.filter.SimpleNode<T>
All Implemented Interfaces:
ExprNode
Direct Known Subclasses:
ApproximateNode, EqualityNode, GreaterEqNode, LessEqNode

public abstract class SimpleNode<T>
extends LeafNode

A simple assertion value node.

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

Field Summary
static boolean EVAL_GREATER
          Constants for comparisons : >
static boolean EVAL_LESSER
          Constants for comparisons : <
protected  Value<T> value
          the value
 
Fields inherited from class org.apache.directory.shared.ldap.filter.AbstractExprNode
annotations, assertionType
 
Constructor Summary
protected SimpleNode(java.lang.String attribute, Value<T> value, AssertionType assertionType)
          Creates a new SimpleNode object.
 
Method Summary
 boolean equals(java.lang.Object other)
           
 Value<T> getValue()
          Gets the value.
 int hashCode()
           
 java.lang.StringBuilder printRefinementToBuffer(java.lang.StringBuilder buf)
          Default implementation for this method : just throw an exception.
 java.lang.StringBuilder printToBuffer(java.lang.StringBuilder buf)
          Pretty prints this expression node along with annotation information.
 void setValue(Value<T> value)
          Sets the value of this node.
 
Methods inherited from class org.apache.directory.shared.ldap.filter.LeafNode
accept, getAttribute, isLeaf, setAttribute
 
Methods inherited from class org.apache.directory.shared.ldap.filter.AbstractExprNode
get, getAnnotations, getAssertionType, set, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

value

protected Value<T> value
the value


EVAL_GREATER

public static final boolean EVAL_GREATER
Constants for comparisons : >

See Also:
Constant Field Values

EVAL_LESSER

public static final boolean EVAL_LESSER
Constants for comparisons : <

See Also:
Constant Field Values
Constructor Detail

SimpleNode

protected SimpleNode(java.lang.String attribute,
                     Value<T> value,
                     AssertionType assertionType)
Creates a new SimpleNode object.

Parameters:
attribute - the attribute name
value - the value to test for
assertionType - the type of assertion represented by this ExprNode
Method Detail

getValue

public final Value<T> getValue()
Gets the value.

Returns:
the value

setValue

public void setValue(Value<T> value)
Sets the value of this node.

Parameters:
value - the value for this node

printToBuffer

public java.lang.StringBuilder printToBuffer(java.lang.StringBuilder buf)
Pretty prints this expression node along with annotation information. TODO - perhaps this belong in some utility class?

Parameters:
buf - the buffer to print into
Returns:
the same buf argument returned for call chaining

printRefinementToBuffer

public java.lang.StringBuilder printRefinementToBuffer(java.lang.StringBuilder buf)
Description copied from class: AbstractExprNode
Default implementation for this method : just throw an exception.

Specified by:
printRefinementToBuffer in interface ExprNode
Overrides:
printRefinementToBuffer in class AbstractExprNode
Parameters:
buf - the buffer to append to.
Returns:
The buffer in which the refinement has been appended
Throws:
java.lang.UnsupportedOperationException - if this node isn't a part of a refinement.
See Also:
ExprNode.printRefinementToBuffer(StringBuilder)

hashCode

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

equals

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


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