org.basex.query.xquery.util
Class NodeBuilder

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

public final class NodeBuilder
extends java.lang.Object

Node Builder.

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

Field Summary
 Nod[] list
          Node array.
 int size
          Number of entries.
 
Constructor Summary
NodeBuilder(boolean ord)
          Constructor.
 
Method Summary
 void add(Nod n)
          Adds a single node.
 void del(int pos)
          Deletes a value at the specified position.
 Item finish()
          Returns a sequence or the atomic item if only one item exists.
 NodIter iter()
          Returns a sequence or the atomic item if only one item exists.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

list

public Nod[] list
Node array.


size

public int size
Number of entries.

Constructor Detail

NodeBuilder

public NodeBuilder(boolean ord)
Constructor.

Parameters:
ord - if set to true, all nodes are supposed to be added in order.
Method Detail

del

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

Parameters:
pos - deletion position

add

public void add(Nod n)
Adds a single node.

Parameters:
n - node to be added

finish

public Item finish()
Returns a sequence or the atomic item if only one item exists.

Returns:
result

iter

public NodIter iter()
Returns a sequence or the atomic item if only one item exists.

Returns:
result