public class OffsetIterator extends java.lang.Object implements java.util.Iterator<MapViewState.MapViewPoint>
Modifier and Type | Field and Description |
---|---|
private int |
idx |
private MapViewState |
mapState |
private java.util.List<MapViewState.MapViewPoint> |
nodes |
private double |
offset |
private MapViewState.MapViewPoint |
prev |
private double |
xPrev0 |
private double |
yPrev0 |
Constructor and Description |
---|
OffsetIterator(java.util.List<MapViewState.MapViewPoint> nodes,
double offset)
Creates a new offset iterator
|
OffsetIterator(MapViewState mapState,
java.util.List<Node> nodes,
double offset)
Creates a new offset iterator
|
Modifier and Type | Method and Description |
---|---|
private MapViewState.MapViewPoint |
getForIndex(int i) |
boolean |
hasNext() |
MapViewState.MapViewPoint |
next() |
void |
remove() |
private final MapViewState mapState
private final java.util.List<MapViewState.MapViewPoint> nodes
private final double offset
private int idx
private MapViewState.MapViewPoint prev
private double xPrev0
private double yPrev0
public OffsetIterator(java.util.List<MapViewState.MapViewPoint> nodes, double offset)
nodes
- The nodes of the original lineoffset
- The offset of the line.public OffsetIterator(MapViewState mapState, java.util.List<Node> nodes, double offset)
mapState
- The map view state this iterator is for.nodes
- The nodes of the original lineoffset
- The offset of the line.public boolean hasNext()
hasNext
in interface java.util.Iterator<MapViewState.MapViewPoint>
public MapViewState.MapViewPoint next()
next
in interface java.util.Iterator<MapViewState.MapViewPoint>
private MapViewState.MapViewPoint getForIndex(int i)
public void remove()
remove
in interface java.util.Iterator<MapViewState.MapViewPoint>