Package com.icl.saxon.expr
Class BooleanValue
java.lang.Object
com.icl.saxon.expr.Expression
com.icl.saxon.expr.Value
com.icl.saxon.expr.BooleanValue
A boolean XPath value
-
Field Summary
Fields inherited from class com.icl.saxon.expr.Expression
staticContext
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Convert to boolean (null operation)double
asNumber()
Convert to numberasString()
Convert to stringint
conversionPreference
(Class required) Get conversion preference for this value to a Java class.convertToJava
(Class target) Convert to Java object (for passing to external functions)void
display
(int level) Diagnostic print of expression structureint
Determine the data type of the exprssionMethods inherited from class com.icl.saxon.expr.Value
compare, equals, evaluate, getDependencies, inverse, notEquals, numericCompare, reduce, simplify, stringToNumber
Methods inherited from class com.icl.saxon.expr.Expression
containsReferences, enumerate, evaluateAsBoolean, evaluateAsNodeSet, evaluateAsNumber, evaluateAsString, getStaticContext, indent, isContextDocumentNodeSet, make, outputStringValue, setStaticContext, usesCurrent
-
Constructor Details
-
BooleanValue
public BooleanValue(boolean value) Constructor: create a boolean value- Parameters:
value
- the initial value, true or false
-
-
Method Details
-
asString
Convert to string -
asNumber
public double asNumber()Convert to number -
asBoolean
public boolean asBoolean()Convert to boolean (null operation) -
getDataType
public int getDataType()Determine the data type of the exprssion- Specified by:
getDataType
in classExpression
- Returns:
- Value.BOOLEAN,
-
conversionPreference
Get conversion preference for this value to a Java class. A low result indicates higher preference.- Specified by:
conversionPreference
in classValue
-
convertToJava
Convert to Java object (for passing to external functions)- Specified by:
convertToJava
in classValue
- Parameters:
target
- The class required by the external function- Returns:
- an object of the target class
- Throws:
XPathException
-
display
public void display(int level) Diagnostic print of expression structure- Specified by:
display
in classExpression
-