Class PathIteratorAdapter.RingIterator

java.lang.Object
org.apache.sis.internal.feature.jts.PathIteratorAdapter.RingIterator
All Implemented Interfaces:
Iterator<org.locationtech.jts.geom.CoordinateSequence>
Enclosing class:
PathIteratorAdapter

private static final class PathIteratorAdapter.RingIterator extends Object implements Iterator<org.locationtech.jts.geom.CoordinateSequence>
An iterator over the coordinate sequences of a polygon. The first coordinate sequence is the exterior ring and all other sequences are interior rings.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private int
    Index of the interior ring, or -1 for the exterior ring.
    private final org.locationtech.jts.geom.Polygon
    The polygon for which to return rings.
  • Constructor Summary

    Constructors
    Constructor
    Description
    RingIterator(org.locationtech.jts.geom.Polygon geometry)
    Created a new iterator for the given polygon.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns true if there is more rings to return.
    org.locationtech.jts.geom.CoordinateSequence
    Returns the coordinate sequence of the next ring.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface java.util.Iterator

    forEachRemaining, remove
  • Field Details

    • polygon

      private final org.locationtech.jts.geom.Polygon polygon
      The polygon for which to return rings.
    • interior

      private int interior
      Index of the interior ring, or -1 for the exterior ring.
  • Constructor Details

    • RingIterator

      RingIterator(org.locationtech.jts.geom.Polygon geometry)
      Created a new iterator for the given polygon.
  • Method Details

    • hasNext

      public boolean hasNext()
      Returns true if there is more rings to return.
      Specified by:
      hasNext in interface Iterator<org.locationtech.jts.geom.CoordinateSequence>
    • next

      public org.locationtech.jts.geom.CoordinateSequence next()
      Returns the coordinate sequence of the next ring.
      Specified by:
      next in interface Iterator<org.locationtech.jts.geom.CoordinateSequence>