public final class BooleanResult extends XPathResult
| Modifier and Type | Field and Description |
|---|---|
static BooleanResult |
FALSE
Boolean result representing false.
|
static BooleanResult |
TRUE
Boolean result representing true.
|
BOOLEAN, NODE_SET, NUMBER, STRING, USER_DEFINED| Modifier and Type | Method and Description |
|---|---|
boolean |
booleanValue()
Returns the result as a boolean value.
|
boolean |
equals(XPathResult result)
Returns true if the given result is a boolean result
and has the same boolean value.
|
static BooleanResult |
from(boolean value)
Returns a boolean result from a boolean value.
|
static BooleanResult |
from(XPathResult result)
Returns a boolean result from an XPath result.
|
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 BooleanResult FALSE
public static final BooleanResult TRUE
public static BooleanResult from(boolean value)
boolean - The boolean valuepublic static BooleanResult from(XPathResult result)
Double.NaN,
a non-empty string, or a non-empty NodeSet.result - An XPath resultpublic int getResultType()
getResultType in class XPathResultXPathResult.BOOLEANpublic boolean booleanValue()
booleanValue in class XPathResultpublic double numberValue()
numberValue in class XPathResultpublic java.lang.String stringValue()
stringValue in class XPathResultpublic java.lang.Object javaObject()
Boolean with the same boolean 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