|
: Class Value
com.icl.saxon.expr
|
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. |
abstract int |
conversionPreference(java.lang.Class required)
Get conversion preference for this value to a Java class. |
abstract java.lang.Object |
convertToJava(java.lang.Class target)
Convert to Java object (for passing to external functions) |
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, display, enumerate, evaluateAsBoolean, evaluateAsNodeSet, evaluateAsNumber, evaluateAsString, getDataType, getStaticContext, indent, isContextDocumentNodeSet, 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 XPathException
evaluate
in class Expression
context
- The context (not used)public Expression simplify()
simplify
in class Expression
public int getDependencies()
getDependencies
in class Expression
public abstract java.lang.String asString() throws XPathException
public abstract double asNumber() throws XPathException
public abstract boolean asBoolean() throws XPathException
public boolean equals(Value other) throws XPathException
public boolean notEquals(Value other) throws XPathException
public boolean compare(int operator, Value other) throws XPathException
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)
reduce
in class Expression
dependencies
- The dependencies to be removedcontext
- The context to be used for the partial evaluationpublic abstract java.lang.Object convertToJava(java.lang.Class target) throws XPathException
target
- The class required by the external functionpublic abstract int conversionPreference(java.lang.Class required)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |