org.basex.query.xquery.item
Class Bln

java.lang.Object
  extended by org.basex.query.xquery.expr.Expr
      extended by org.basex.query.xquery.item.Item
          extended by org.basex.query.xquery.item.Bln

public final class Bln
extends Item

Boolean item.

Author:
Workgroup DBIS, University of Konstanz 2005-07, ISC License, Christian Gruen

Field Summary
static Bln FALSE
          Static boolean item (use with care).
static Bln TRUE
          Static boolean item (use with care).
 
Fields inherited from class org.basex.query.xquery.expr.Expr
type
 
Method Summary
 boolean bool()
          Returns a boolean representation of the item.
static boolean check(byte[] str)
          Checks if the specified value is a correct boolean string.
 double dbl()
          Returns a double representation of the item.
 int diff(Item it)
          Returns the difference between the current and the specified item.
 boolean eq(Item it)
          Checks the items for equality.
 float flt()
          Returns a float representation of the item.
static Bln get(boolean b)
          Returns a static item instance.
 long itr()
          Returns a numeric (long) representation of the item.
 byte[] str()
          Returns an atomized string.
 java.lang.String toString()
           
 
Methods inherited from class org.basex.query.xquery.item.Item
castErr, comp, eval, i, info, iter, serialize, serialize, size
 
Methods inherited from class org.basex.query.xquery.expr.Expr
cls, d, e, n, node, s, u
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FALSE

public static final Bln FALSE
Static boolean item (use with care).


TRUE

public static final Bln TRUE
Static boolean item (use with care).

Method Detail

bool

public boolean bool()
Description copied from class: Item
Returns a boolean representation of the item.

Overrides:
bool in class Item
Returns:
boolean value

check

public static boolean check(byte[] str)
                     throws XQException
Checks if the specified value is a correct boolean string.

Parameters:
str - string to be checked
Returns:
result of check
Throws:
XQException - evaluation exception

dbl

public double dbl()
Description copied from class: Item
Returns a double representation of the item.

Overrides:
dbl in class Item
Returns:
double value

diff

public int diff(Item it)
         throws XQException
Description copied from class: Item
Returns the difference between the current and the specified item.

Overrides:
diff in class Item
Parameters:
it - item to be compared.
Returns:
difference
Throws:
XQException - evaluation exception

eq

public boolean eq(Item it)
           throws XQException
Description copied from class: Item
Checks the items for equality.

Specified by:
eq in class Item
Parameters:
it - item to be compared.
Returns:
result of check
Throws:
XQException - evaluation exception

flt

public float flt()
Description copied from class: Item
Returns a float representation of the item.

Overrides:
flt in class Item
Returns:
float value

get

public static Bln get(boolean b)
Returns a static item instance.

Parameters:
b - boolean value
Returns:
item

itr

public long itr()
Description copied from class: Item
Returns a numeric (long) representation of the item.

Overrides:
itr in class Item
Returns:
long value

str

public byte[] str()
Description copied from class: Expr
Returns an atomized string.

Overrides:
str in class Expr
Returns:
string representation

toString

public java.lang.String toString()
Overrides:
toString in class Item