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