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