|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.saxon.value.Value
net.sf.saxon.value.AtomicValue
net.sf.saxon.value.BooleanValue
public final class BooleanValue
A boolean XPath value
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 |
int |
conversionPreference(Class required)
Get conversion preference for this value to a Java class. |
AtomicValue |
convert(int requiredType)
Convert to target data type |
Object |
convertToJava(Class target)
Convert to Java object (for passing to external functions) |
void |
display(int level,
NamePool pool)
Diagnostic print of expression structure |
boolean |
effectiveBooleanValue(XPathContext context)
Get the effective boolean value of this expression |
boolean |
equals(Object other)
Determine whether two boolean values are equal |
static BooleanValue |
get(boolean value)
Factory method: get a BooleanValue |
ItemType |
getItemType()
Determine the data type of the expression |
String |
getStringValue()
Convert to string |
boolean |
getValue()
Get the value |
int |
hashCode()
Get a hash code for comparing two BooleanValues |
String |
toString()
Diagnostic display of this value as a string |
Methods inherited from class net.sf.saxon.value.AtomicValue |
---|
convert, convert, evaluateAsString, evaluateItem, getCardinality, getComponent, getPrimitiveValue, getTypedValue, iterate |
Methods inherited from class net.sf.saxon.value.Value |
---|
analyze, asItem, asValue, collapseWhitespace, getDependencies, getSpecialProperties, getSubExpressions, inverse, normalizeWhitespace, promote, simplify, stringToInteger, stringToNumber, trimWhitespace |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final BooleanValue TRUE
public static final BooleanValue FALSE
Method Detail |
---|
public static BooleanValue get(boolean value)
value
- true or false, to determine which boolean value is
required
public boolean getValue()
public boolean effectiveBooleanValue(XPathContext context)
effectiveBooleanValue
in interface Expression
effectiveBooleanValue
in class AtomicValue
context
- dynamic evaluation context, not used in this
implementation
public AtomicValue convert(int requiredType) throws XPathException
convert
in class AtomicValue
requiredType
- an integer identifying the required atomic type
XPathException
- if the conversion is not possiblepublic String getStringValue()
getStringValue
in interface Item
public ItemType getItemType()
getItemType
in interface Expression
public int conversionPreference(Class required)
conversionPreference
in class AtomicValue
required
- the Java class to which the value is to be converted
public Object convertToJava(Class target) throws XPathException
convertToJava
in class AtomicValue
target
- the Java class to which conversion is required
XPathException
- if conversion is not possible or failspublic int compareTo(Object other)
compareTo
in interface Comparable
other
- The other boolean value
ClassCastException
- 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 Object
other
- the value to be compared to this value
public int hashCode()
hashCode
in class Object
public void display(int level, NamePool pool)
display
in interface Expression
level
- indentation level of outputpublic String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |