org.basex.query.xpath.item
Class NodeBuilder

java.lang.Object
  extended by org.basex.query.xpath.item.NodeBuilder

public final class NodeBuilder
extends java.lang.Object

NodeSet Constructor.

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

Field Summary
 int[] nodes
          Node array.
 int size
          Size of node array.
 
Constructor Summary
NodeBuilder()
          Constructor, creating an empty node set.
NodeBuilder(int[] ids)
          Constructor, creating a new node set from the specified node ids.
 
Method Summary
 void add(int pre)
          Adds a pre value to the node set.
 void add(NodeBuilder build)
          Adds a node set.
 int[] finish()
          Returns the node array after sorting and duplicate elimination.
 void reset()
          Reset the NodeSet so it can be reused.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nodes

public int[] nodes
Node array.


size

public int size
Size of node array.

Constructor Detail

NodeBuilder

public NodeBuilder()
Constructor, creating an empty node set.


NodeBuilder

public NodeBuilder(int[] ids)
Constructor, creating a new node set from the specified node ids.

Parameters:
ids - node ids
Method Detail

add

public void add(int pre)
Adds a pre value to the node set.

Parameters:
pre - value to be added.

add

public void add(NodeBuilder build)
Adds a node set.

Parameters:
build - node set to be added.

reset

public void reset()
Reset the NodeSet so it can be reused.


finish

public int[] finish()
Returns the node array after sorting and duplicate elimination.

Returns:
node array.