org.basex.query.util
Class ANodeList

java.lang.Object
  extended by org.basex.util.list.ElementList
      extended by org.basex.query.util.ANodeList
All Implemented Interfaces:
java.lang.Iterable<ANode>

public final class ANodeList
extends ElementList
implements java.lang.Iterable<ANode>

This is a light-weight container for XML nodes.

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

Field Summary
 
Fields inherited from class org.basex.util.list.ElementList
factor, size
 
Constructor Summary
ANodeList()
          Constructor.
ANodeList(ANode... n)
          Constructor, specifying initial nodes.
ANodeList(int c)
          Constructor, specifying an initial array capacity.
 
Method Summary
 void add(ANode e)
          Adds an element to the array.
 ANode get(int p)
          Returns the specified element.
 java.util.Iterator<ANode> iterator()
           
 void set(int i, ANode e)
          Sets an element at the specified index position.
 Value value()
          Returns an array with all elements.
 
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

ANodeList

public ANodeList()
Constructor.


ANodeList

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

Parameters:
c - array capacity

ANodeList

public ANodeList(ANode... n)
Constructor, specifying initial nodes.

Parameters:
n - initial nodes
Method Detail

add

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

Parameters:
e - element to be added

set

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

Parameters:
i - index
e - element to be set

get

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

Parameters:
p - position
Returns:
value

value

public Value value()
Returns an array with all elements.

Returns:
array

iterator

public java.util.Iterator<ANode> iterator()
Specified by:
iterator in interface java.lang.Iterable<ANode>