org.basex.query.xquery.util
Class SeqBuilder

java.lang.Object
  extended by org.basex.query.xquery.util.SeqBuilder

public final class SeqBuilder
extends java.lang.Object

Sequence Builder.

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

Field Summary
 Item[] item
          Item array.
 int size
          Number of entries.
 
Constructor Summary
SeqBuilder()
           
 
Method Summary
 void a(Item i)
          Adds an atomic item.
 void add(Item it)
          Adds an item.
 void add(Item[] it, int s)
          Adds all items of the specified array.
 void del(int pos)
          Deletes a value at the specified position.
 Item finish()
          Returns an atomic item or a sequence.
 void i(Item i, int p)
          Inserts an item at the specified position.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

item

public Item[] item
Item array.


size

public int size
Number of entries.

Constructor Detail

SeqBuilder

public SeqBuilder()
Method Detail

a

public void a(Item i)
Adds an atomic item. Note that the item must be no sequence.

Parameters:
i - entry to be added

add

public void add(Item it)
Adds an item. If the item is a sequence, adds all sequence entries.

Parameters:
it - entry to be added

add

public void add(Item[] it,
                int s)
Adds all items of the specified array.

Parameters:
it - item array
s - number of items to be added

del

public void del(int pos)
Deletes a value at the specified position.

Parameters:
pos - deletion position

finish

public Item finish()
Returns an atomic item or a sequence.

Returns:
sequence

i

public void i(Item i,
              int p)
Inserts an item at the specified position. Note that the item must be no sequence.

Parameters:
i - entry to be added
p - insert position