public final class BooleanValue extends AtomicValue implements Comparable
| Modifier and Type | Field and Description |
|---|---|
static BooleanValue |
FALSE
The boolean value FALSE
|
static BooleanValue |
TRUE
The boolean value TRUE
|
typeLabel| Constructor and Description |
|---|
BooleanValue(boolean value,
AtomicType typeLabel)
Create a new Boolean value with a user-supplied type label.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Object other)
Compare the value to another boolean value
|
AtomicValue |
copyAsSubType(AtomicType typeLabel)
Create a copy of this atomic value (usually so that the type label can be changed).
|
boolean |
effectiveBooleanValue()
Get the effective boolean value of this expression
|
boolean |
equals(Object other)
Determine whether two boolean values are equal
|
static ConversionResult |
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
|
String |
getPrimitiveStringValue()
Convert to string
|
BuiltInAtomicType |
getPrimitiveType()
Determine the primitive type of the value.
|
Comparable |
getSchemaComparable()
Get a Comparable value that implements the XML Schema ordering comparison semantics for this value.
|
Object |
getXPathComparable(boolean ordered,
StringCollator collator,
XPathContext context)
Get a Comparable value that implements the XPath ordering comparison semantics for this value.
|
int |
hashCode()
Get a hash code for comparing two BooleanValues
|
String |
toString()
Diagnostic display of this value as a string
|
asAtomic, checkPermittedContents, getCanonicalLexicalRepresentation, getCardinality, getComponent, getItemType, getStringValue, getStringValueCS, head, isIdentical, isIdentical, isNaN, itemAt, iterate, process, setTypeLabelgetLength, reduce, subsequenceclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetLengthreduce, subsequencepublic static final BooleanValue TRUE
public static final BooleanValue FALSE
public BooleanValue(boolean value,
AtomicType typeLabel)
value - the boolean valuetypeLabel - the type label, xs:boolean or a subtypepublic static BooleanValue get(boolean value)
value - true or false, to determine which boolean value is
requiredpublic AtomicValue copyAsSubType(AtomicType typeLabel)
copyAsSubType in class AtomicValuetypeLabel - the atomic type label to be added to the copied valuepublic static ConversionResult fromString(CharSequence s)
s - the input stringpublic boolean getBooleanValue()
public boolean effectiveBooleanValue()
effectiveBooleanValue in interface GroundedValueeffectiveBooleanValue in class AtomicValuepublic BuiltInAtomicType getPrimitiveType()
getPrimitiveType in class AtomicValuepublic String getPrimitiveStringValue()
getPrimitiveStringValue in class AtomicValuepublic Comparable getSchemaComparable()
In the case of data types that are partially ordered, the returned Comparable extends the standard
semantics of the compareTo() method by returning the value SequenceTool.INDETERMINATE_ORDERING when there
is no defined order relationship between two given values.
getSchemaComparable in interface AtomicSequencegetSchemaComparable in class AtomicValuepublic Object getXPathComparable(boolean ordered, StringCollator collator, XPathContext context)
getXPathComparable in class AtomicValueordered - collator - context - public int compareTo(Object other)
compareTo in interface Comparableother - The other boolean valueClassCastException - if the other value is not a BooleanValue
(the parameter is declared as Object to satisfy the Comparable
interface)public boolean equals(Object other)
equals in class AtomicValueother - the value to be compared to this valueClassCastException - if other value is not xs:boolean or derived therefrompublic int hashCode()
public String toString()
toString in class AtomicValueCopyright (c) 2004-2013 Saxonica Limited. All rights reserved.