public class BooleanVariant extends VariantBase
Constructor and Description |
---|
BooleanVariant(boolean b)
Constructs a Variant for specified boolean.
|
Modifier and Type | Method and Description |
---|---|
boolean |
convertToBoolean()
Returns this Variant converted to a boolean.
|
double |
convertToNumber()
Returns this Variant converted to a double.
|
Object |
convertToObject()
Returns this Variant converted to an alien Java object (typically
returned by an extension function invoked using Java introspection).
|
String |
convertToString()
Returns this Variant converted to a string.
|
boolean |
isBoolean()
Returns
true if this Variant is a boolean value. |
String |
toString()
Returns a string representation of this Variant which is useful when
debugging or when testing this implementation of XPath.
|
convertToNodeSet, convertToPredicate, create, isNodeSet, isNumber, isString, makePermanent
public BooleanVariant(boolean b)
public String convertToString()
Variant
public boolean convertToBoolean()
Variant
public double convertToNumber()
Variant
convertToNumber
in interface Variant
convertToNumber
in class VariantBase
public Object convertToObject()
Variant
public boolean isBoolean()
Variant
true
if this Variant is a boolean value.isBoolean
in interface Variant
isBoolean
in class VariantBase