org.basex.query.util
Class ExprList

java.lang.Object
  extended by org.basex.util.list.ElementList
      extended by org.basex.query.util.ExprList

public final class ExprList
extends ElementList

This is a simple container for expressions.

Author:
BaseX Team 2005-12, BSD License, Christian Gruen

Field Summary
 
Fields inherited from class org.basex.util.list.ElementList
factor, size
 
Constructor Summary
ExprList()
          Default constructor.
ExprList(Expr c)
          Constructor, specifying an initial entry.
ExprList(int c)
          Constructor, specifying an initial array capacity.
 
Method Summary
 void add(Expr e)
          Adds an element to the array.
 Expr[] finish()
          Returns an array with all elements.
 Expr get(int p)
          Returns the specified element.
 void set(int i, Expr e)
          Sets an element at the specified index position.
 
Methods inherited from class org.basex.util.list.ElementList
isEmpty, newSize, newSize, reset, size, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExprList

public ExprList()
Default constructor.


ExprList

public ExprList(int c)
Constructor, specifying an initial array capacity.

Parameters:
c - array capacity

ExprList

public ExprList(Expr c)
Constructor, specifying an initial entry.

Parameters:
c - array capacity
Method Detail

get

public Expr get(int p)
Returns the specified element.

Parameters:
p - position
Returns:
value

add

public void add(Expr e)
Adds an element to the array.

Parameters:
e - element to be added

set

public void set(int i,
                Expr e)
Sets an element at the specified index position.

Parameters:
i - index
e - element to be set

finish

public Expr[] finish()
Returns an array with all elements. Warning: returns the internal array representation for better performance.

Returns:
internal array