public class MapSquareIterator<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> extends java.lang.Object implements java.util.Iterator<MapSquare<G,A,R>>
Constructor and Description |
---|
MapSquareIterator(@NotNull MapModel<G,A,R> mapModel,
@Nullable java.awt.Point start,
int direction,
boolean skipFirst)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext() |
MapSquare<G,A,R> |
next() |
void |
remove() |
public MapSquareIterator(@NotNull @NotNull MapModel<G,A,R> mapModel, @Nullable @Nullable java.awt.Point start, int direction, boolean skipFirst)
mapModel
- the map model to iterate overstart
- the starting point or null
for defaultdirection
- the direction to iterate: +1
for forward, -1
for backwardskipFirst
- whether to skip the first map square and return it at
the end