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


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 getDataType()
          Determine the data type of the exprssion
 java.lang.String toString()
          Get string representation
 
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, make, outputStringValue, setStaticContext, usesCurrent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, 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
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

toString

public java.lang.String toString()
Get string representation
Overrides:
toString in class java.lang.Object
Returns:
"true" or "false"

getDataType

public int getDataType()
Determine the data type of the exprssion
Overrides:
getDataType in class Expression
Returns:
Value.BOOLEAN,