org.exolab.adaptx.xpath
Class NumberResult
- java.io.Serializable
public final class NumberResult
Represents a number result. This is an immutable object.
$Revision: 3633 $ $Date: 2003-03-01 08:38:44 +0100 (Sat, 01 Mar 2003) $static NumberResult | NaN - Number result representing
java.lang.Double.NaN (not a number).
|
NumberResult(double value) - Creates a new number result with the given value.
|
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.
|
Object | javaObject() - Returns the result as a Java object.
|
double | numberValue() - Returns the result as a number value.
|
String | stringValue() - Returns the result as a string value.
|
String | toString()
|
NaN
public static final NumberResult NaN
Number result representing java.lang.Double.NaN
(not a number).
NumberResult
public NumberResult(double value)
Creates a new number result with the given value.
booleanValue
public boolean booleanValue()
Returns the result as a boolean value. Returns true if the
number value is not zero.
- booleanValue in interface XPathResult
- The result as a boolean value
equals
public boolean equals(XPathResult result)
Returns true if the given result is a number result
and has the same number value.
- equals in interface XPathResult
- True if a number result and has same value
javaObject
public Object javaObject()
Returns the result as a Java object. Returns an object of
type java.lang.Double
with the same number value.
- javaObject in interface XPathResult
- The result as a Java object
numberValue
public double numberValue()
Returns the result as a number value.
- numberValue in interface XPathResult
- The result as a number value
stringValue
public String stringValue()
Returns the result as a string value.
- stringValue in interface XPathResult
- The result as a string value
toString
public String toString()