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 XPathResult
XPathResult.NUMBER
public boolean booleanValue()
booleanValue
in class XPathResult
public double numberValue()
numberValue
in class XPathResult
public java.lang.String stringValue()
stringValue
in class XPathResult
public java.lang.Object javaObject()
Double
with the same number value.javaObject
in class XPathResult
public boolean equals(XPathResult result)
equals
in class XPathResult
result
- An XPath resultpublic java.lang.String toString()
toString
in class java.lang.Object