org.basex.query.xquery.item
Class Seq

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

public class Seq
extends Item

Item sequence.

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

Nested Class Summary
 
Nested classes/interfaces inherited from class org.basex.query.xquery.expr.Expr
Expr.Return, Expr.Using
 
Field Summary
static Seq EMPTY
          Empty sequence.
 int size
          Number of entries.
 Item[] val
          Item array.
 
Fields inherited from class org.basex.query.xquery.item.Item
type
 
Method Summary
 boolean bool()
          Returns a boolean 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.
static Item get(Item[] v, int s)
          Constructor.
 boolean i()
          Checks if this is an item.
 Iter iter()
          Returns an item iterator.
 void plan(Serializer ser)
          Recursively sends the abstract syntax of this expression to the specified serializer.
 int size()
          Returns the sequence size or 1.
 byte[] str()
          Returns an atomized string.
 java.lang.String toString()
           
 
Methods inherited from class org.basex.query.xquery.item.Item
castErr, comp, d, dbl, dec, flt, hash, iter, itr, java, n, name, node, returned, s, score, score, serialize, u, uses
 
Methods inherited from class org.basex.query.xquery.expr.Expr
e
 
Methods inherited from class org.basex.query.ExprInfo
color, info
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EMPTY

public static final Seq EMPTY
Empty sequence.


val

public Item[] val
Item array.


size

public int size
Number of entries.

Method Detail

get

public static Item get(Item[] v,
                       int s)
Constructor.

Parameters:
v - value
s - size
Returns:
resulting item or sequence

i

public final boolean i()
Description copied from class: Expr
Checks if this is an item.

Overrides:
i in class Item
Returns:
result of check

size

public int size()
Description copied from class: Item
Returns the sequence size or 1.

Overrides:
size in class Item
Returns:
result of check

str

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

Overrides:
str in class Item
Returns:
string representation

bool

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

Overrides:
bool in class Item
Returns:
boolean value
Throws:
XQException - evaluation exception

iter

public Iter iter()
Description copied from class: Item
Returns an item iterator.

Overrides:
iter in class Item
Returns:
iterator

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

diff

public int diff(Item it)
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

toString

public java.lang.String toString()
Overrides:
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.

Overrides:
plan in class Item
Parameters:
ser - serializer
Throws:
java.io.IOException - exception