public abstract class SimpleNode<T> extends LeafNode
Modifier and Type | Field and Description |
---|---|
static boolean |
EVAL_GREATER
Constants for comparisons : >
|
static boolean |
EVAL_LESSER
Constants for comparisons : <
|
protected Value<T> |
value
the value
|
attribute, attributeType
annotations, assertionType, isSchemaAware
Modifier | Constructor and Description |
---|---|
protected |
SimpleNode(AttributeType attributeType,
Value<T> value,
AssertionType assertionType)
Creates a new SimpleNode object.
|
protected |
SimpleNode(String attribute,
Value<T> value,
AssertionType assertionType)
Creates a new SimpleNode object.
|
Modifier and Type | Method and Description |
---|---|
ExprNode |
clone()
Makes a full clone in new memory space of the current node and children
|
boolean |
equals(Object other) |
Value<?> |
getEscapedValue() |
Value<T> |
getValue()
Gets the value.
|
int |
hashCode() |
StringBuilder |
printRefinementToBuffer(StringBuilder buf)
Default implementation for this method : just throw an exception.
|
StringBuilder |
printToBuffer(StringBuilder buf)
Pretty prints this expression node along with annotation information.
|
void |
setValue(Value<T> value)
Sets the value of this node.
|
accept, getAttribute, getAttributeType, isLeaf, setAttribute, setAttributeType
escapeFilterValue, get, getAnnotations, getAssertionType, isSchemaAware, set, toString
public static final boolean EVAL_GREATER
public static final boolean EVAL_LESSER
protected SimpleNode(String attribute, Value<T> value, AssertionType assertionType)
attribute
- the attribute namevalue
- the value to test forassertionType
- the type of assertion represented by this ExprNodeprotected SimpleNode(AttributeType attributeType, Value<T> value, AssertionType assertionType)
attribute
- the attribute namevalue
- the value to test forassertionType
- the type of assertion represented by this ExprNodepublic ExprNode clone()
clone
in interface ExprNode
clone
in class AbstractExprNode
public Value<?> getEscapedValue()
public void setValue(Value<T> value)
value
- the value for this nodepublic StringBuilder printToBuffer(StringBuilder buf)
buf
- the buffer to print intopublic StringBuilder printRefinementToBuffer(StringBuilder buf)
AbstractExprNode
printRefinementToBuffer
in interface ExprNode
printRefinementToBuffer
in class AbstractExprNode
buf
- the buffer to append to.UnsupportedOperationException
- if this node isn't a part of a refinement.ExprNode.printRefinementToBuffer(StringBuilder)
public int hashCode()
hashCode
in class LeafNode
Object.hashCode()
public boolean equals(Object other)
equals
in class LeafNode
true
if both objects are equalObject.equals(java.lang.Object)
Copyright © 2003–2014 The Apache Software Foundation. All rights reserved.