org.basex.query.xpath.item
Class Bln

java.lang.Object
  extended by org.basex.query.ExprInfo
      extended by org.basex.query.xpath.expr.Expr
          extended by org.basex.query.xpath.item.Item
              extended by org.basex.query.xpath.item.Bln
All Implemented Interfaces:
Result

public final class Bln
extends Item

XPath Value representing a boolean.

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

Field Summary
static Bln FALSE
          Static false value.
static Bln 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.
 Bln eval(XPContext ctx)
          Evaluates the expression with the specified context set.
static Bln get(boolean val)
          Returns an instance of this class.
 double num()
          Returns the double value.
 void plan(Serializer ser)
          Recursively sends the abstract syntax of this expression to the specified serializer.
 int prec()
          Returns the evaluation precedence.
 byte[] str()
          Returns the literal value.
 java.lang.String toString()
           
 
Methods inherited from class org.basex.query.xpath.item.Item
comp, same, serialize, serialize, size, usesPos, usesSize
 
Methods inherited from class org.basex.query.xpath.expr.Expr
indexEquivalent, indexSizes, returnedValue, sameAs
 
Methods inherited from class org.basex.query.ExprInfo
color, info, name
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TRUE

public static final Bln TRUE
Static true value.


FALSE

public static final Bln FALSE
Static false value.

Method Detail

get

public static Bln get(boolean val)
Returns an instance of this class.

Parameters:
val - boolean value
Returns:
class instance

eval

public Bln 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

bool

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

Specified by:
bool in class Item
Returns:
boolean value

num

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

Specified by:
num in class Item
Returns:
double value

str

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

Specified by:
str in class Item
Returns:
literal value

prec

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

Returns:
evaluation precedence

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.

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.

toString

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

plan

public void plan(Serializer ser)
          throws java.io.IOException
Description copied from class: ExprInfo
Recursively sends the abstract syntax of this expression to the specified serializer.

Specified by:
plan in class ExprInfo
Parameters:
ser - serializer
Throws:
java.io.IOException - exception