public class LineLocationIterator extends java.lang.Object implements DataLocationIterator
LineLocationIterator
class iterates over data
locations along a line between start and end locations. See LineIterator
for details on how the locations
are incremented along a line. Currently, only 2D data locations
are supported.Constructor and Description |
---|
LineLocationIterator(DataLocation start,
DataLocation end)
Creates a new line location iterator.
|
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext() |
static void |
main(java.lang.String[] argv)
Tests this class.
|
DataLocation |
next() |
DataLocation |
nextLocation(DataLocation loc)
Gets the next data location.
|
void |
remove() |
void |
reset()
Resets the iterator to the first element.
|
public LineLocationIterator(DataLocation start, DataLocation end)
start
- the starting data location.end
- the ending data location.public boolean hasNext()
hasNext
in interface java.util.Iterator<DataLocation>
public DataLocation nextLocation(DataLocation loc)
DataLocationIterator
nextLocation
in interface DataLocationIterator
loc
- the location to fill in with coordinates, or null to
allocate a new location.public void remove()
remove
in interface java.util.Iterator<DataLocation>
public void reset()
ResettableIterator
reset
in interface ResettableIterator
public DataLocation next()
next
in interface java.util.Iterator<DataLocation>
public static void main(java.lang.String[] argv)
argv
- the array of command line parameters.