public final class StringResult extends XPathResult
| Modifier and Type | Field | Description |
|---|---|---|
static StringResult |
EMPTY |
String result representing an empty string.
|
BOOLEAN, NODE_SET, NUMBER, STRING, USER_DEFINED| Constructor | Description |
|---|---|
StringResult() |
Creates a new string result with an empty string as
it's value.
|
StringResult(java.lang.String value) |
Creates a new string 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 string result
and has the same string 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() |
Returns the String representation of this XPathResult
|
public static final StringResult EMPTY
public StringResult()
public StringResult(java.lang.String value)
value - The string value (not null)public int getResultType()
getResultType in class XPathResultXPathResult.STRINGpublic boolean booleanValue()
booleanValue in class XPathResultpublic double numberValue()
Double.NaN
if the value is not a valid number.numberValue in class XPathResultpublic java.lang.String stringValue()
stringValue in class XPathResultpublic java.lang.Object javaObject()
String with the same string 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