Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

Field Summary

Fields inherited from class com.icl.saxon.expr.Value
`ANY, BOOLEAN, NODESET, NUMBER, OBJECT, STRING`

Fields inherited from class com.icl.saxon.expr.Expression
`staticContext`

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.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`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### BooleanValue

    public BooleanValue(boolean value)

  Constructor: create a boolean value

Parameters:
  `value` - the initial value, true or false

Method Detail

### asString

    public java.lang.String asString()

  Convert to string

  Specified by:
    `asString` in class `Value`
  Returns:
    "true" or "false"

### asNumber

    public double asNumber()

  Convert to number

  Specified by:
    `asNumber` in class `Value`
  Returns:
    1 for true, 0 for false

### asBoolean

    public boolean asBoolean()

  Convert to boolean (null operation)

  Specified by:
    `asBoolean` in class `Value`
  Returns:
    the value

### getDataType

    public int getDataType()

  Determine the data type of the exprssion

  Specified by:
    `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.

  Specified by:
    `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)

  Specified by:
    `convertToJava` in class `Value`
  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 class `Expression`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD