com.icl.saxon.expr
Class NumericValue
public final class NumericValue
A numeric (floating point) value
boolean | asBoolean() - Convert the value to a boolean
|
double | asNumber() - Get the value as a number
|
String | asString() - Get the value as a String
|
String | asStringOLD() - Get the value as a String
|
int | conversionPreference(Class required) - Get conversion preference for this value to a Java class.
|
Object | convertToJava(Class target) - Convert to Java object (for passing to external functions)
|
void | display(int level) - Diagnostic print of expression structure
|
int | getDataType() - Determine the data type of the exprssion, if possible
|
asBoolean , asNumber , asString , compare , conversionPreference , convertToJava , equals , evaluate , getDependencies , inverse , notEquals , numericCompare , reduce , simplify , stringToNumber |
containsReferences , display , enumerate , evaluate , evaluateAsBoolean , evaluateAsNodeSet , evaluateAsNumber , evaluateAsString , getDataType , getDependencies , getStaticContext , indent , isContextDocumentNodeSet , make , outputStringValue , reduce , setStaticContext , simplify , usesCurrent |
NumericValue
public NumericValue(String s)
Constructor supplying a String
NumericValue
public NumericValue(double value)
Constructor supplying a double
asBoolean
public boolean asBoolean()
Convert the value to a boolean
- asBoolean in interface Value
- false if zero, true otherwise
asNumber
public double asNumber()
Get the value as a number
- asNumber in interface Value
- the numeric value
asString
public String asString()
Get the value as a String
- asString in interface Value
- a String representation of the value
asStringOLD
public String asStringOLD()
Get the value as a String
- a String representation of the value
conversionPreference
public int conversionPreference(Class required)
Get conversion preference for this value to a Java class. A low result
indicates higher preference.
- conversionPreference in interface Value
convertToJava
public Object convertToJava(Class target)
throws XPathException
Convert to Java object (for passing to external functions)
- convertToJava in interface Value
display
public void display(int level)
Diagnostic print of expression structure
- display in interface Expression
getDataType
public int getDataType()
Determine the data type of the exprssion, if possible
- getDataType in interface Expression
- one of the values Value.STRING, Value.BOOLEAN, Value.NUMBER, Value.NODESET,
Value.FRAGMENT, or Value.ANY (meaning not known in advance)