Class PointToIndexIterator<T extends PointIndex<T,​P>,​P extends GeoTuple<P>>

All Implemented Interfaces:
IteratorReset<T>, Iterator<T>

public class PointToIndexIterator<T extends PointIndex<T,​P>,​P extends GeoTuple<P>>
extends Object
implements IteratorReset<T>
Specialized iterator that takes in a list of points but iterates over PointIndex. The same instance of a PointIndex is returned every iteration to improve performance.
  • Constructor Details

    • PointToIndexIterator

      public PointToIndexIterator​(List<P> list, int idx0, int idx1, T point)
  • Method Details

    • reset

      public void reset()
      Description copied from interface: IteratorReset
      Returns the iterator to its original state allowing it to be reused
      Specified by:
      reset in interface IteratorReset<T extends PointIndex<T,​P>>
    • setRange

      public void setRange​(int idx0, int idx1)
    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface Iterator<T extends PointIndex<T,​P>>
    • next

      public T next()
      Specified by:
      next in interface Iterator<T extends PointIndex<T,​P>>