net.sf.saxon.value
public final class BooleanValue extends AtomicValue implements Comparable
Field Summary | |
---|---|
static BooleanValue | FALSE
The boolean value FALSE |
static BooleanValue | TRUE
The boolean value TRUE |
Method Summary | |
---|---|
int | compareTo(Object other)
Compare the value to another boolean value
|
AtomicValue | convertPrimitive(BuiltInAtomicType requiredType, boolean validate, XPathContext context)
Convert to target data type |
Object | convertToJava(Class target, XPathContext context)
Convert to Java object (for passing to external functions)
|
boolean | effectiveBooleanValue(XPathContext context)
Get the effective boolean value of this expression
|
boolean | equals(Object other)
Determine whether two boolean values are equal
|
static AtomicValue | fromString(CharSequence s)
Convert a string to a boolean value, using the XML Schema rules (including
whitespace trimming) |
static BooleanValue | get(boolean value)
Factory method: get a BooleanValue
|
boolean | getBooleanValue()
Get the value |
ItemType | getItemType(TypeHierarchy th)
Determine the data type of the expression |
String | getStringValue()
Convert to string |
int | hashCode()
Get a hash code for comparing two BooleanValues
|
String | toString()
Diagnostic display of this value as a string |
Parameters: other The other boolean value
Returns: -1 if this one is the lower, 0 if they are equal, +1 if this one is the higher. False is considered to be less than true.
Throws: ClassCastException if the other value is not a BooleanValue (the parameter is declared as Object to satisfy the Comparable interface)
Parameters: requiredType an integer identifying the required atomic type context
Returns: an AtomicValue, a value of the required type
Parameters: target the Java class to which conversion is required
Returns: An object of the specified Java class
Throws: XPathException if conversion is not possible or fails
Parameters: context dynamic evaluation context, not used in this implementation
Returns: the boolean value
Parameters: other the value to be compared to this value
Returns: true if the other value is a boolean value and is equal to this value
Parameters: s the input string
Returns: the relevant BooleanValue if validation succeeds; or an ErrorValue if not.
Parameters: value true or false, to determine which boolean value is required
Returns: the BooleanValue requested
Returns: true or false, the actual boolean value of this BooleanValue
Parameters: th
Returns: Type.BOOLEAN,
Returns: "true" or "false"
Returns: the hash code
Returns: a string representation of this value: "true()" or "false()"