Interface DataLocationIterator

All Superinterfaces:
Iterator<DataLocation>, ResettableIterator
All Known Implementing Classes:
ConstrainedStrideLocationIterator, LineLocationIterator, StrideLocationIterator

public interface DataLocationIterator extends Iterator<DataLocation>, ResettableIterator
The DataLocationIterator class adds an extra interface method to return the next data location. This helps to save allocating space for a new DataLocation object every time the next location is needed.
Since:
3.1.7
Author:
Peter Hollemans
  • Method Details

    • nextLocation

      DataLocation nextLocation(DataLocation loc)
      Gets the next data location.
      Parameters:
      loc - the location to fill in with coordinates, or null to allocate a new location.
      Returns:
      the next location. The location is allocated only if the passed location is null, otherwise the same location is returned.