Esri Geoportal Server
1.0

com.esri.gpt.framework.xml
Class NodeListAdapter

java.lang.Object
  extended by com.esri.gpt.framework.xml.NodeListAdapter
All Implemented Interfaces:
Iterable<Node>

public class NodeListAdapter
extends Object
implements Iterable<Node>

Handy implmenetation of Iterator over a NodeList. Allows to create iteration mechanizm utilizing for( element : elements ) loop. Example:

     NodeList ndList = ...; // obtain a list of nodes
     for (Node nd : new NodeListAdapter(ndList)) {
        // do something usefull with nd 
     }
 


Constructor Summary
NodeListAdapter(NodeList nodes)
          Creates instance of the adapter.
 
Method Summary
 Iterator<Node> iterator()
          Returns an iterator over a set of nodes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeListAdapter

public NodeListAdapter(NodeList nodes)
Creates instance of the adapter.

Parameters:
nodes - nodes to iterate over (can be null)
Method Detail

iterator

public Iterator<Node> iterator()
Returns an iterator over a set of nodes. This is always instance of ReadOnlyIterator.

Specified by:
iterator in interface Iterable<Node>
Returns:
iterator

Esri Geoportal Server
1.0

Copyright 2011 Environmental Systems Research Institute. All rights reserved. Use is subject to license terms.