public final class NumberResult extends XPathResult
| Modifier and Type | Field | Description |
|---|---|---|
static NumberResult |
NaN |
Number result representing
Double.NaN (not a number). |
BOOLEAN, NODE_SET, NUMBER, STRING, USER_DEFINED| Constructor | Description |
|---|---|
NumberResult(double value) |
Creates a new number result with the given value.
|
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
booleanValue() |
Returns the result as a boolean value.
|
boolean |
equals(XPathResult result) |
Returns true if the given result is a number result
and has the same number value.
|
int |
getResultType() |
Returns the type of this result.
|
java.lang.Object |
javaObject() |
Returns the result as a Java object.
|
double |
numberValue() |
Returns the result as a number value.
|
java.lang.String |
stringValue() |
Returns the result as a string value.
|
java.lang.String |
toString() |
public static final NumberResult NaN
Double.NaN (not a number).public NumberResult(double value)
value - The number valuepublic int getResultType()
getResultType in class XPathResultXPathResult.NUMBERpublic boolean booleanValue()
booleanValue in class XPathResultpublic double numberValue()
numberValue in class XPathResultpublic java.lang.String stringValue()
stringValue in class XPathResultpublic java.lang.Object javaObject()
Double with the same number value.javaObject in class XPathResultpublic boolean equals(XPathResult result)
equals in class XPathResultresult - An XPath resultpublic java.lang.String toString()
toString in class java.lang.Object