dk.brics.xact
Class NodeList<T extends Node>

java.lang.Object
  extended by dk.brics.xact.NodeList<T>
All Implemented Interfaces:
Iterable<T>

public class NodeList<T extends Node>
extends Object
implements Iterable<T>

List of nodes.


Constructor Summary
NodeList(Iterable<T> ns)
          Constructs a new NodeList.
 
Method Summary
 XML concat()
          Concatenates the list of nodes into an XML template.
 T get(int index)
          Returns the node at the given index.
 boolean isEmpty()
          Checks whether the list is empty.
 Iterator<T> iterator()
          Returns a list iterator.
 int size()
          Returns the size of the list.
 String toString()
          Returns a description of the nodes in this list.
 XML toXML()
          Concatenates the list of nodes into an XML template.
 void visitBy(NodeVisitor v)
          Visits each node in the list by the given visitor.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NodeList

public NodeList(Iterable<T> ns)
Constructs a new NodeList.

See Also:
XML.get(String)
Method Detail

concat

public XML concat()
Concatenates the list of nodes into an XML template.


get

public T get(int index)
Returns the node at the given index.


isEmpty

public boolean isEmpty()
Checks whether the list is empty.


iterator

public Iterator<T> iterator()
Returns a list iterator.

Specified by:
iterator in interface Iterable<T extends Node>

size

public int size()
Returns the size of the list.


toString

public String toString()
Returns a description of the nodes in this list.

Overrides:
toString in class Object

toXML

public XML toXML()
Concatenates the list of nodes into an XML template.


visitBy

public final void visitBy(NodeVisitor v)
Visits each node in the list by the given visitor.



Copyright © 2005-2011 Aarhus University.