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, attributeTypeannotations, 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, setAttributeTypeescapeFilterValue, get, getAnnotations, getAssertionType, isSchemaAware, set, toStringpublic 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 ExprNodeclone in class AbstractExprNodepublic 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)
AbstractExprNodeprintRefinementToBuffer in interface ExprNodeprintRefinementToBuffer in class AbstractExprNodebuf - 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 LeafNodeObject.hashCode()public boolean equals(Object other)
equals in class LeafNodetrue if both objects are equalObject.equals(java.lang.Object)Copyright © 2003–2016 The Apache Software Foundation. All rights reserved.