public final class BooleanResult extends XPathResult
Modifier and Type | Field | 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 | 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 XPathResult
XPathResult.BOOLEAN
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()
Boolean
with the same boolean 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