com.vividsolutions.jts.geom
Class GeometryCollectionIterator

java.lang.Object
  extended bycom.vividsolutions.jts.geom.GeometryCollectionIterator
All Implemented Interfaces:
java.util.Iterator

public class GeometryCollectionIterator
extends java.lang.Object
implements java.util.Iterator

Iterates over all Geometrys in a GeometryCollection. Implements a pre-order depth-first traversal of the GeometryCollection (which may be nested). The original GeometryCollection is returned as well (as the first object), as are all sub-collections. It is simple to ignore the GeometryCollection objects if they are not needed.

Version:
1.7

Constructor Summary
GeometryCollectionIterator(Geometry parent)
          Constructs an iterator over the given GeometryCollection.
 
Method Summary
 boolean hasNext()
           
 java.lang.Object next()
           
 void remove()
          Not implemented.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeometryCollectionIterator

public GeometryCollectionIterator(Geometry parent)
Constructs an iterator over the given GeometryCollection.

Parameters:
parent - the collection over which to iterate; also, the first element returned by the iterator.
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator

next

public java.lang.Object next()
Specified by:
next in interface java.util.Iterator

remove

public void remove()
Not implemented.

Specified by:
remove in interface java.util.Iterator
Throws:
java.lang.UnsupportedOperationException - This method is not implemented.