org.basex.query.xpath.values
Class Bool

java.lang.Object
  extended by org.basex.query.xpath.expr.Expr
      extended by org.basex.query.xpath.values.Item
          extended by org.basex.query.xpath.values.Bool
All Implemented Interfaces:
Result

public final class Bool
extends Item

XPath Value representing a boolean.

Author:
Workgroup DBIS, University of Konstanz 2005-07, ISC License, Tim Petrowsky

Field Summary
static Bool FALSE
          Static false value.
static Bool TRUE
          Static true value.
 
Method Summary
 boolean appr(Item v)
          Checks the approximate equality of the value and the specified value.
 boolean apprContains(Item v)
          Checks whether this value approximately contains the word(s) in val.
 boolean bool()
          Returns the boolean value.
 boolean eq(Item v)
          Checks the equality of the value and the specified value.
 Bool eval(XPContext ctx)
          Evaluates the expression with the specified context set.
static Bool get(boolean val)
          Returns a Bool instance.
 double num()
          Returns the double value.
 int prec()
          Returns the evaluation precedence.
 byte[] str()
          Returns the literal value.
 java.lang.String toString()
           
 
Methods inherited from class org.basex.query.xpath.values.Item
compile, sameAs, serialize, serialize, size, usesPos, usesSize
 
Methods inherited from class org.basex.query.xpath.expr.Expr
indexEquivalent, indexSizes, returnedValue, sameAs
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FALSE

public static final Bool FALSE
Static false value.


TRUE

public static final Bool TRUE
Static true value.

Method Detail

appr

public boolean appr(Item v)
Description copied from class: Item
Checks the approximate equality of the value and the specified value.

Parameters:
v - value to be compared
Returns:
result of comparison.

apprContains

public boolean apprContains(Item v)
Description copied from class: Item
Checks whether this value approximately contains the word(s) in val.

Parameters:
v - value to be compared
Returns:
result of comparison.

bool

public boolean bool()
Description copied from class: Item
Returns the boolean value.

Specified by:
bool in class Item
Returns:
boolean value

eq

public boolean eq(Item v)
Description copied from class: Item
Checks the equality of the value and the specified value.

Specified by:
eq in class Item
Parameters:
v - value to be compared
Returns:
result of comparison.

eval

public Bool eval(XPContext ctx)
Description copied from class: Expr
Evaluates the expression with the specified context set. Additionally provides a context

Specified by:
eval in class Expr
Parameters:
ctx - query context
Returns:
resulting XPathValue

get

public static Bool get(boolean val)
Returns a Bool instance.

Parameters:
val - boolean value
Returns:
Bool instance

num

public double num()
Description copied from class: Item
Returns the double value.

Specified by:
num in class Item
Returns:
double value

prec

public int prec()
Description copied from class: Item
Returns the evaluation precedence.

Returns:
evaluation precedence

str

public byte[] str()
Description copied from class: Item
Returns the literal value.

Specified by:
str in class Item
Returns:
literal value

toString

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