Class Constant
java.lang.Object
org.apache.commons.jxpath.ri.compiler.Expression
org.apache.commons.jxpath.ri.compiler.Constant
A compile tree element containing a constant number or string.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.commons.jxpath.ri.compiler.Expression
Expression.PointerIterator, Expression.ValueIterator -
Field Summary
Fields inherited from class org.apache.commons.jxpath.ri.compiler.Expression
NOT_A_NUMBER, ONE, ZERO -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncompute(EvalContext context) Evaluates the expression.booleanReturns falsecomputeValue(EvalContext context) Evaluates the expression.booleanReturns falsetoString()Methods inherited from class org.apache.commons.jxpath.ri.compiler.Expression
iterate, iteratePointers
-
Constructor Details
-
Constant
Constructs a new Constant.- Parameters:
number- constant
-
Constant
Constructs a new Constant.- Parameters:
string- constant
-
-
Method Details
-
compute
Description copied from class:ExpressionEvaluates the expression. If the result is a node set, returns the first element of the node set.- Specified by:
computein classExpression- Parameters:
context- evaluation context- Returns:
- Object
-
computeContextDependent
Returns false- Specified by:
computeContextDependentin classExpression- Returns:
- false
-
computeValue
Description copied from class:ExpressionEvaluates the expression. If the result is a node set, returns the first element of the node set.- Specified by:
computeValuein classExpression- Parameters:
context- evaluation context- Returns:
- Object
-
isContextDependent
Returns false- Overrides:
isContextDependentin classExpression- Returns:
- false
-
toString
-