public final class BooleanValue extends AtomicValue implements XPathComparable, AtomicMatchKey, ContextFreeAtomicValue
| 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(XPathComparable 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(java.lang.Object other)
Determine whether two boolean values are equal
|
static ConversionResult |
fromString(UnicodeString 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
|
UnicodeString |
getPrimitiveStringValue()
Convert to string
|
BuiltInAtomicType |
getPrimitiveType()
Determine the primitive type of the value.
|
XPathComparable |
getXPathComparable()
Get an XPathComparable object that supports the semantics of context-free
eq and lt comparisons between atomic values.
|
XPathComparable |
getXPathComparable(StringCollator collator,
int implicitTimezone)
Get an object value that implements the XPath equality and ordering comparison semantics for this value.
|
AtomicMatchKey |
getXPathMatchKey(StringCollator collator,
int implicitTimezone)
Get a Comparable value that implements the XPath ordering comparison semantics for this value.
|
int |
hashCode()
Get a hash code for comparing two BooleanValues
|
java.lang.String |
show()
Diagnostic display of this value as a string
|
asAtomic, asMapKey, atomize, checkPermittedContents, checkValidInJavascript, getCanonicalLexicalRepresentation, getCardinality, getComponent, getGenre, getItemType, getLength, getUnicodeStringValue, getUType, head, identityHashCode, isIdentical, isIdentical, isNaN, isUntypedAtomic, itemAt, iterate, iterator, setTypeLabel, toShortString, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitasAtomicgetStringValue, isStreamed, reduce, subsequenceasIterable, concatenate, containsNode, materializemakeRepeatablepublic 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(UnicodeString s)
s - the input stringpublic boolean getBooleanValue()
public boolean effectiveBooleanValue()
effectiveBooleanValue in interface GroundedValueeffectiveBooleanValue in class AtomicValuepublic BuiltInAtomicType getPrimitiveType()
getPrimitiveType in class AtomicValuepublic UnicodeString getPrimitiveStringValue()
getPrimitiveStringValue in class AtomicValuepublic AtomicMatchKey getXPathMatchKey(StringCollator collator, int implicitTimezone)
getXPathMatchKey in class AtomicValuecollator - the collation to be used when comparing stringsimplicitTimezone - the XPath dynamic evaluation context, used in cases where the comparison is context
sensitivepublic XPathComparable getXPathComparable(StringCollator collator, int implicitTimezone)
AtomicValuegetXPathComparable in class AtomicValuecollator - the collation to be used when comparing stringsimplicitTimezone - the implicit timezone in the dynamic context, used when comparing
dates/times with and without timezonepublic XPathComparable getXPathComparable()
ContextFreeAtomicValueComparable interface, this
cannot be assumed.getXPathComparable in interface ContextFreeAtomicValuepublic int compareTo(XPathComparable other)
compareTo in interface java.lang.Comparable<XPathComparable>other - The other boolean valuejava.lang.ClassCastException - if the other value is not a BooleanValue
(the parameter is declared as Object to satisfy the Comparable
interface)public boolean equals(java.lang.Object other)
equals in class AtomicValueother - the value to be compared to this valuejava.lang.ClassCastException - if other value is not xs:boolean or derived therefrompublic int hashCode()
hashCode in class AtomicValuepublic java.lang.String show()
show in class AtomicValueCopyright (c) 2004-2022 Saxonica Limited. All rights reserved.