org.basex.query.xpath.item
Class Str

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.Str
All Implemented Interfaces:
Result

public final class Str
extends Item

XPath Literal.

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

Constructor Summary
Str(byte[] chars)
          Constructor.
 
Method Summary
 boolean appr(Item val)
          Checks the approximate equality of the value and the specified value.
 boolean bool()
          Returns the boolean value.
 boolean eq(Item val)
          Checks the equality of the value and the specified value.
 Str eval(XPContext ctx)
          Evaluates the expression with the specified context set.
 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
 

Constructor Detail

Str

public Str(byte[] chars)
Constructor.

Parameters:
chars - Characters to represent
Method Detail

eval

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

str

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

Specified by:
str in class Item
Returns:
literal value

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

eq

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

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

appr

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

Parameters:
val - 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