|
: Class BooleanValue
com.icl.saxon.expr
Class BooleanValue
java.lang.Object
|
+--com.icl.saxon.expr.Expression
|
+--com.icl.saxon.expr.Value
|
+--com.icl.saxon.expr.BooleanValue
- public final class BooleanValue
- extends Value
A boolean XPath value
Constructor Summary |
BooleanValue(boolean value)
Constructor: create a boolean value |
Method Summary |
boolean |
asBoolean()
Convert to boolean (null operation) |
double |
asNumber()
Convert to number |
java.lang.String |
asString()
Convert to string |
int |
conversionPreference(java.lang.Class required)
Get conversion preference for this value to a Java class. |
java.lang.Object |
convertToJava(java.lang.Class target)
Convert to Java object (for passing to external functions) |
void |
display(int level)
Diagnostic print of expression structure |
int |
getDataType()
Determine the data type of the exprssion |
Methods inherited from class com.icl.saxon.expr.Expression |
containsReferences, enumerate, evaluateAsBoolean, evaluateAsNodeSet, evaluateAsNumber, evaluateAsString, getStaticContext, indent, isContextDocumentNodeSet, make, outputStringValue, setStaticContext, usesCurrent |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BooleanValue
public BooleanValue(boolean value)
- Constructor: create a boolean value
- Parameters:
value - the initial value, true or false
asString
public java.lang.String asString()
- Convert to string
- Overrides:
asString in class Value
- Returns:
- "true" or "false"
asNumber
public double asNumber()
- Convert to number
- Overrides:
asNumber in class Value
- Returns:
- 1 for true, 0 for false
asBoolean
public boolean asBoolean()
- Convert to boolean (null operation)
- Overrides:
asBoolean in class Value
- Returns:
- the value
getDataType
public int getDataType()
- Determine the data type of the exprssion
- Overrides:
getDataType in class Expression
- Returns:
- Value.BOOLEAN,
conversionPreference
public int conversionPreference(java.lang.Class required)
- Get conversion preference for this value to a Java class. A low result
indicates higher preference.
- Overrides:
conversionPreference in class Value
convertToJava
public java.lang.Object convertToJava(java.lang.Class target)
throws XPathException
- Convert to Java object (for passing to external functions)
- Overrides:
convertToJava in class Value
- Following copied from class:
com.icl.saxon.expr.Value
- Parameters:
target - The class required by the external function- Returns:
- an object of the target class
display
public void display(int level)
- Diagnostic print of expression structure
- Overrides:
display in class Expression
|