com.caucho.xpath.expr
Class IdExpr
java.lang.Object
com.caucho.xpath.Expr
com.caucho.xpath.expr.IdExpr
public class IdExpr
- extends Expr
Fields inherited from class com.caucho.xpath.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 Summary |
IdExpr(java.util.ArrayList<Expr> args)
|
Method Summary |
boolean |
evalBoolean(org.w3c.dom.Node node,
ExprEnvironment env)
Evaluates the expression as a boolean |
double |
evalNumber(org.w3c.dom.Node node,
ExprEnvironment env)
Evaluates the expression as a number |
java.lang.Object |
evalObject(org.w3c.dom.Node node,
ExprEnvironment env)
The string value of the id expression is just the list of nodes. |
java.lang.String |
evalString(org.w3c.dom.Node node,
ExprEnvironment env)
The string value of the id expression is just the text value of the
first node. |
boolean |
isNodeSet()
true if the expression prefers to return a node set. |
java.lang.String |
toString()
|
Methods inherited from class com.caucho.xpath.Expr |
addParam, addVar, evalBoolean, evalNodeSet, evalNodeSet, evalNumber, evalObject, evalString, evalString, evalString, evalVar, getListContext, isBoolean, isNumber, isString, setListContext, setVar, stringToNumber, toBoolean, toDouble, toNode, toNodeList, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
IdExpr
public IdExpr(java.util.ArrayList<Expr> args)
isNodeSet
public boolean isNodeSet()
- Description copied from class:
Expr
- true if the expression prefers to return a node set.
- Overrides:
isNodeSet
in class Expr
evalNumber
public double evalNumber(org.w3c.dom.Node node,
ExprEnvironment env)
throws XPathException
- Evaluates the expression as a number
- Specified by:
evalNumber
in class Expr
- Parameters:
node
- the current nodeenv
- the variable environment.
- Returns:
- the number representation of id
- Throws:
XPathException
evalBoolean
public boolean evalBoolean(org.w3c.dom.Node node,
ExprEnvironment env)
throws XPathException
- Evaluates the expression as a boolean
- Specified by:
evalBoolean
in class Expr
- Parameters:
node
- the current nodeenv
- the variable environment.
- Returns:
- true if the node exists
- Throws:
XPathException
evalString
public java.lang.String evalString(org.w3c.dom.Node node,
ExprEnvironment env)
throws XPathException
- The string value of the id expression is just the text value of the
first node.
- Specified by:
evalString
in class Expr
- Parameters:
node
- the current nodeenv
- the variable environment.
- Returns:
- true if the node exists
- Throws:
XPathException
evalObject
public java.lang.Object evalObject(org.w3c.dom.Node node,
ExprEnvironment env)
throws XPathException
- The string value of the id expression is just the list of nodes.
- Specified by:
evalObject
in class Expr
- Parameters:
node
- the current nodeenv
- the variable environment.
- Returns:
- true if the node exists
- Throws:
XPathException
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object