org.ucl.xpath.types
Class XSBoolean

java.lang.Object
  extended byorg.ucl.xpath.types.AnyType
      extended byorg.ucl.xpath.types.AnySimpleType
          extended byorg.ucl.xpath.types.AnyAtomicType
              extended byorg.ucl.xpath.types.CtrType
                  extended byorg.ucl.xpath.types.XSBoolean
All Implemented Interfaces:
CmpEq, CmpGt, CmpLt

public class XSBoolean
extends CtrType
implements CmpEq, CmpGt, CmpLt

A representation of a true or a false value.


Constructor Summary
XSBoolean()
          Initiates to a default representation of false.
XSBoolean(boolean x)
          Initiates the new representation to the boolean supplied
 
Method Summary
 ResultSequence constructor(ResultSequence arg)
          Creates a new result sequence consisting of the retrievable boolean value in the supplied result sequence
 boolean eq(AnyType arg)
          Comparison for equality between the supplied and this boolean representation.
 boolean gt(AnyType arg)
          Comparison between the supplied and this boolean representation.
 boolean lt(AnyType arg)
          Comparison between the supplied and this boolean representation.
 java.lang.String string_type()
          Retrieve the full type pathname of this datatype
 java.lang.String string_value()
          Retrieve the String representation of the boolean value stored
 java.lang.String type_name()
          Retrieve the datatype name
 boolean value()
          Retrieves the actual boolean value stored
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XSBoolean

public XSBoolean(boolean x)
Initiates the new representation to the boolean supplied

Parameters:
x - Initialises this datatype to represent this boolean

XSBoolean

public XSBoolean()
Initiates to a default representation of false.

Method Detail

string_type

public java.lang.String string_type()
Retrieve the full type pathname of this datatype

Specified by:
string_type in class AnyType
Returns:
"xs:boolean", the full datatype pathname

type_name

public java.lang.String type_name()
Retrieve the datatype name

Specified by:
type_name in class CtrType
Returns:
"boolean", which is the datatype name.

string_value

public java.lang.String string_value()
Retrieve the String representation of the boolean value stored

Specified by:
string_value in class AnyType
Returns:
the String representation of the boolean value stored

value

public boolean value()
Retrieves the actual boolean value stored

Returns:
the actual boolean value stored

constructor

public ResultSequence constructor(ResultSequence arg)
                           throws DynamicError
Creates a new result sequence consisting of the retrievable boolean value in the supplied result sequence

Specified by:
constructor in class CtrType
Parameters:
arg - The result sequence from which to extract the boolean value.
Returns:
A new result sequence consisting of the boolean value supplied.
Throws:
DynamicError

eq

public boolean eq(AnyType arg)
           throws DynamicError
Comparison for equality between the supplied and this boolean representation. Returns true if both represent same boolean value, false otherwise

Specified by:
eq in interface CmpEq
Parameters:
arg - The XSBoolean representation of the boolean value to compare with.
Returns:
New XSBoolean representation of true/false result of the equality comparison
Throws:
DynamicError

gt

public boolean gt(AnyType arg)
           throws DynamicError
Comparison between the supplied and this boolean representation. Returns true if this XSBoolean represents true and that XSBoolean supplied represents false. Returns false otherwise

Specified by:
gt in interface CmpGt
Parameters:
arg - The XSBoolean representation of the boolean value to compare with.
Returns:
New XSBoolean representation of true/false result of the comparison
Throws:
DynamicError

lt

public boolean lt(AnyType arg)
           throws DynamicError
Comparison between the supplied and this boolean representation. Returns true if this XSBoolean represents false and that XSBoolean supplied represents true. Returns false otherwise

Specified by:
lt in interface CmpLt
Parameters:
arg - The XSBoolean representation of the boolean value to compare with.
Returns:
New XSBoolean representation of true/false result of the comparison
Throws:
DynamicError