|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.icl.saxon.expr.Expression | +--com.icl.saxon.expr.Value
A value is the result of an expression but it is also an expression in its own right
Field Summary | |
static int |
ANY
|
static int |
BOOLEAN
Constants denoting the data types of an expression or value |
static int |
NODESET
|
static int |
NUMBER
|
static int |
OBJECT
|
static int |
STRING
|
Fields inherited from class com.icl.saxon.expr.Expression |
staticContext |
Constructor Summary | |
Value()
|
Method Summary | |
abstract boolean |
asBoolean()
Convert the value to a Boolean |
abstract double |
asNumber()
Convert the value to a Number |
abstract java.lang.String |
asString()
Convert the value to a String value |
boolean |
compare(int operator,
Value other)
Test how a Value compares to another Value under a relational comparison. |
boolean |
equals(Value other)
Test whether two values are equal. |
Value |
evaluate(Context context)
Evaluate the Value. |
int |
getDependencies()
Determine which aspects of the context the expression depends on. |
protected static int |
inverse(int operator)
Return the inverse of a relational operator, so that "a op b" can be rewritten as "b inverse(op) a" |
boolean |
notEquals(Value other)
Test whether two values are not-equal. |
protected boolean |
numericCompare(int operator,
double x,
double y)
|
Expression |
reduce(int dependencies,
Context context)
Perform a partial evaluation of the expression, by eliminating specified dependencies on the context. |
Expression |
simplify()
Simplify an expression |
static double |
stringToNumber(java.lang.String s)
Static method to convert strings to numbers. |
Methods inherited from class com.icl.saxon.expr.Expression |
containsReferences, enumerate, evaluateAsBoolean, evaluateAsNodeSet, evaluateAsNumber, evaluateAsString, getDataType, getStaticContext, make, outputStringValue, setStaticContext, usesCurrent |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int BOOLEAN
public static final int NUMBER
public static final int STRING
public static final int NODESET
public static final int OBJECT
public static final int ANY
Constructor Detail |
public Value()
Method Detail |
public static double stringToNumber(java.lang.String s)
s
- the String to be convertedpublic Value evaluate(Context context) throws org.xml.sax.SAXException
evaluate
in class Expression
context
- The context (not used)public Expression simplify() throws org.xml.sax.SAXException
simplify
in class Expression
public int getDependencies()
getDependencies
in class Expression
public abstract java.lang.String asString() throws org.xml.sax.SAXException
public abstract double asNumber() throws org.xml.sax.SAXException
public abstract boolean asBoolean() throws org.xml.sax.SAXException
public boolean equals(Value other) throws org.xml.sax.SAXException
public boolean notEquals(Value other) throws org.xml.sax.SAXException
public boolean compare(int operator, Value other) throws org.xml.sax.SAXException
operator
- The comparison operator, one of Tokenizer.LE, Tokenizer.LT,
Tokenizer.GE, Tokenizer.GT, Tokenizer.EQUALS, Tokenizer.NE.protected static final int inverse(int operator)
protected final boolean numericCompare(int operator, double x, double y)
public Expression reduce(int dependencies, Context context) throws org.xml.sax.SAXException
reduce
in class Expression
dependencies
- The dependencies to be removedcontext
- The context to be used for the partial evaluation
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |