public class StringExpr extends Expr
ADD, AND, ATTRIBUTE, BASE_URI, BOOLEAN, BOOLEAN_EQ, BOOLEAN_NEQ, CEILING, CONCAT, CONST, CONTAINS, COUNT, DIV, ELEMENT, EQ, FALSE, FLOOR, FORMAT_NUMBER, FUNCTION_AVAILABLE, GE, GENERATE_ID, GT, ID, IF, LANG, LAST, LAST_FUN, LE, LOCAL_PART, LT, MOD, MUL, NAMESPACE, NEG, NEQ, NODE_SET, NORMALIZE, NOT, NUMBER, NUMBER_EQ, NUMBER_GE, NUMBER_GT, NUMBER_LE, NUMBER_LT, NUMBER_NEQ, OR, POSITION, QNAME, QUO, ROUND, SELF, SELF_NAME, STARTS_WITH, STRING, STRING_EQ, STRING_LENGTH, STRING_NEQ, SUB, SUBSTRING, SUBSTRING_AFTER, SUBSTRING_BEFORE, SUM, SYSTEM_PROPERTY, TRANSLATE, TRUE| Constructor and Description |
|---|
StringExpr(int code,
java.util.ArrayList args)
Creates a string expression from a list of arguments.
|
StringExpr(int code,
Expr expr) |
StringExpr(int code,
Expr left,
Expr right) |
StringExpr(int code,
Expr left,
Expr right,
Expr third)
Create a StringExpression with three arguments.
|
StringExpr(java.lang.String value) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
evalBoolean(org.w3c.dom.Node node,
ExprEnvironment env)
Evaluate the expression as a boolean, i.e.
|
double |
evalNumber(org.w3c.dom.Node node,
ExprEnvironment env)
Evaluate the expression as a double, i.e.
|
java.lang.Object |
evalObject(org.w3c.dom.Node node,
ExprEnvironment env)
Evaluate the expression as an object, i.e.
|
java.lang.String |
evalString(org.w3c.dom.Node node,
ExprEnvironment env)
Evaluates the expression as an string.
|
java.lang.String |
getValue() |
boolean |
isString()
The StringExpr returns a string value.
|
java.lang.String |
toString()
Return the expression as a string.
|
addParam, addVar, evalBoolean, evalNodeSet, evalNodeSet, evalNumber, evalObject, evalString, evalString, evalString, evalVar, getListContext, isBoolean, isNodeSet, isNumber, setListContext, setVar, stringToNumber, toBoolean, toDouble, toNode, toNodeList, toStringpublic StringExpr(int code,
Expr left,
Expr right,
Expr third)
code - the Expr code of the expression.left - the first argument.right - the second argument.third - the third argument.public StringExpr(int code,
Expr expr)
public StringExpr(java.lang.String value)
public StringExpr(int code,
java.util.ArrayList args)
code - Expr code for the function.args - array list of the arguments.public boolean isString()
public java.lang.String getValue()
public java.lang.String evalString(org.w3c.dom.Node node,
ExprEnvironment env)
throws XPathException
evalString in class Exprnode - the current nodeenv - the variable environment.XPathExceptionpublic boolean evalBoolean(org.w3c.dom.Node node,
ExprEnvironment env)
throws XPathException
evalBoolean in class Exprnode - the current nodeenv - the variable environment.XPathExceptionpublic double evalNumber(org.w3c.dom.Node node,
ExprEnvironment env)
throws XPathException
evalNumber in class Exprnode - the current nodeenv - the variable environment.XPathExceptionpublic java.lang.Object evalObject(org.w3c.dom.Node node,
ExprEnvironment env)
throws XPathException
evalObject in class Exprnode - the current nodeenv - the variable environment.XPathExceptionpublic java.lang.String toString()
toString in class java.lang.Object