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.boolean
Returns falsecomputeValue
(EvalContext context) Evaluates the expression.boolean
Returns 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:Expression
Evaluates the expression. If the result is a node set, returns the first element of the node set.- Specified by:
compute
in classExpression
- Parameters:
context
- evaluation context- Returns:
- Object
-
computeContextDependent
Returns false- Specified by:
computeContextDependent
in classExpression
- Returns:
- false
-
computeValue
Description copied from class:Expression
Evaluates the expression. If the result is a node set, returns the first element of the node set.- Specified by:
computeValue
in classExpression
- Parameters:
context
- evaluation context- Returns:
- Object
-
isContextDependent
Returns false- Overrides:
isContextDependent
in classExpression
- Returns:
- false
-
toString
-