electric.xml
Class Elements

java.lang.Object
  extended byelectric.xml.Nodes
      extended byelectric.xml.Elements
All Implemented Interfaces:
java.util.Enumeration

public class Elements
extends Nodes

Elements is an enumeration over a collection of elements. To iterate through the collection in a typesafe way, use current(), first() and next().

Author:
webMethods

Field Summary
 
Fields inherited from class electric.xml.Nodes
current, list
 
Constructor Summary
Elements(Element element)
          Construct an Elements associated with the single specific element.
Elements(NodeList list)
          Construct an Elements associated with the specified node list.
 
Method Summary
 Element current()
          Return the current Element, or null if there is none.
 Element first()
          Move to the first Element and return it, or null if there is none.
 Element next()
          Return the current Element and then advance to the next one if present.
 
Methods inherited from class electric.xml.Nodes
currentNode, firstNode, getNodeList, hasMoreElements, nextElement, nextNode, remove, reset, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Elements

public Elements(NodeList list)
Construct an Elements associated with the specified node list.

Parameters:
list - The list of Element nodes.

Elements

public Elements(Element element)
Construct an Elements associated with the single specific element.

Parameters:
element - The element.
Method Detail

current

public Element current()
Return the current Element, or null if there is none.


first

public Element first()
Move to the first Element and return it, or null if there is none.


next

public Element next()
Return the current Element and then advance to the next one if present.



copyright© 2001-2004 by webMethods All Rights Reserved.