public class GeometryCollectionIterator extends Object implements Iterator
Geometrys in a Geometry,
(which may be either a collection or an atomic geometry).
The iteration sequence follows a pre-order, depth-first traversal of the
structure of the GeometryCollection
(which may be nested). The original Geometry object is
returned as well (as the first object), as are all sub-collections and atomic elements.
It is simple to ignore the intermediate GeometryCollection objects if they are not
needed.| Constructor and Description |
|---|
GeometryCollectionIterator(Geometry parent)
Constructs an iterator over the given
Geometry. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext()
Tests whether any geometry elements remain to be returned.
|
Object |
next()
Gets the next geometry in the iteration sequence.
|
void |
remove()
Removal is not supported.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingpublic GeometryCollectionIterator(Geometry parent)
Geometry.parent - the geometry over which to iterate; also, the first
element returned by the iterator.public boolean hasNext()
public Object next()
public void remove()
remove in interface IteratorUnsupportedOperationException - This method is not implemented.Copyright © 2024. All rights reserved.