Class SimpleNode<T>
- java.lang.Object
-
- org.apache.directory.api.ldap.model.filter.AbstractExprNode
-
- org.apache.directory.api.ldap.model.filter.LeafNode
-
- org.apache.directory.api.ldap.model.filter.SimpleNode<T>
-
- Type Parameters:
T- The Value type
- Direct Known Subclasses:
ApproximateNode,EqualityNode,GreaterEqNode,LessEqNode
public abstract class SimpleNode<T> extends LeafNode
A simple assertion value node.- Author:
- Apache Directory Project
-
-
Field Summary
Fields Modifier and Type Field Description protected byte[]bytesThe value as a byte[]static booleanEVAL_GREATERConstants for comparisons : @gt;static booleanEVAL_LESSERConstants for comparisons : <protected Valuevaluethe value-
Fields inherited from class org.apache.directory.api.ldap.model.filter.LeafNode
attribute, attributeType
-
Fields inherited from class org.apache.directory.api.ldap.model.filter.AbstractExprNode
annotations, assertionType
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSimpleNode(String attribute, byte[] bytes, AssertionType assertionType)Creates a new SimpleNode object.protectedSimpleNode(String attribute, String string, AssertionType assertionType)Creates a new SimpleNode object.protectedSimpleNode(AttributeType attributeType, byte[] bytes, AssertionType assertionType)Creates a new SimpleNode object.protectedSimpleNode(AttributeType attributeType, Value value, AssertionType assertionType)Creates a new SimpleNode object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExprNodeclone()Makes a full clone in new memory space of the current node and childrenbooleanequals(Object other)StringgetEscapedValue()ValuegetValue()Gets the value.inthashCode()StringBuilderprintRefinementToBuffer(StringBuilder buf)Default implementation for this method : just throw an exception.StringBuilderprintToBuffer(StringBuilder buf)Pretty prints this expression node along with annotation information.voidsetValue(Value value)Sets the value of this node.-
Methods inherited from class org.apache.directory.api.ldap.model.filter.LeafNode
accept, escapeFilterValue, escapeFilterValue, getAttribute, getAttributeType, isLeaf, isSchemaAware, setAttribute, setAttributeType
-
Methods inherited from class org.apache.directory.api.ldap.model.filter.AbstractExprNode
get, getAnnotations, getAssertionType, set, toString
-
-
-
-
Field Detail
-
value
protected Value value
the value
-
bytes
protected byte[] bytes
The value as a byte[]
-
EVAL_GREATER
public static final boolean EVAL_GREATER
Constants for comparisons : @gt;- 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(String attribute, byte[] bytes, AssertionType assertionType)
Creates a new SimpleNode object.- Parameters:
attribute- the attribute namebytes- the data to injectassertionType- the type of assertion represented by this ExprNode
-
SimpleNode
protected SimpleNode(AttributeType attributeType, byte[] bytes, AssertionType assertionType)
Creates a new SimpleNode object.- Parameters:
attributeType- the attribute namebytes- the data to injectassertionType- the type of assertion represented by this ExprNode
-
SimpleNode
protected SimpleNode(String attribute, String string, AssertionType assertionType)
Creates a new SimpleNode object.- Parameters:
attribute- the attribute namestring- the value to injectassertionType- the type of assertion represented by this ExprNode
-
SimpleNode
protected SimpleNode(AttributeType attributeType, Value value, AssertionType assertionType)
Creates a new SimpleNode object.- Parameters:
attributeType- the attribute namevalue- the value to test forassertionType- the type of assertion represented by this ExprNode
-
-
Method Detail
-
clone
public ExprNode clone()
Makes a full clone in new memory space of the current node and children- Specified by:
clonein interfaceExprNode- Overrides:
clonein classAbstractExprNode- Returns:
- the cloned expression node
-
getValue
public final Value getValue()
Gets the value.- Returns:
- the value
-
getEscapedValue
public String getEscapedValue()
- Returns:
- representation of value, escaped for use in a filter if required
-
setValue
public void setValue(Value value)
Sets the value of this node.- Parameters:
value- the value for this node
-
printToBuffer
public StringBuilder printToBuffer(StringBuilder buf)
Pretty prints this expression node along with annotation information.- Parameters:
buf- the buffer to print into- Returns:
- the same buf argument returned for call chaining
-
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
- Throws:
UnsupportedOperationException- if this node isn't a part of a refinement.- See Also:
ExprNode.printRefinementToBuffer(StringBuilder)
-
hashCode
public int hashCode()
- Overrides:
hashCodein classLeafNode- Returns:
- the instance's hash code
- See Also:
Object.hashCode()
-
equals
public boolean equals(Object other)
- Overrides:
equalsin classLeafNode- Returns:
trueif both objects are equal- See Also:
Object.equals(java.lang.Object)
-
-