Package net.sf.gridarta.model.mapmodel
Class TopLevelGameObjectIterator<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
- java.lang.Object
-
- net.sf.gridarta.model.mapmodel.TopLevelGameObjectIterator<G,A,R>
-
- All Implemented Interfaces:
java.util.Iterator<G>
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>Iterator for iterating over top-level game object of a map model.
-
-
Constructor Summary
Constructors Constructor Description TopLevelGameObjectIterator(@NotNull MapModel<G,A,R> mapModel, @NotNull java.awt.Point start, int direction, boolean skipFirst)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasNext()Gnext()voidremove()
-
-
-
Constructor Detail
-
TopLevelGameObjectIterator
public TopLevelGameObjectIterator(@NotNull @NotNull MapModel<G,A,R> mapModel, @NotNull @NotNull java.awt.Point start, int direction, boolean skipFirst)Creates a new instance.- Parameters:
mapModel- the map model to iterate overstart- the starting pointdirection- the direction to iterate:+1for forward,-1for backwardskipFirst- whether to skip the first map square and return it at the end
-
-
Method Detail
-
hasNext
public boolean hasNext()
- Specified by:
hasNextin interfacejava.util.Iterator<G extends GameObject<G,A,R>>
-
next
@NotNull public G next()
- Specified by:
nextin interfacejava.util.Iterator<G extends GameObject<G,A,R>>
-
remove
public void remove()
- Specified by:
removein interfacejava.util.Iterator<G extends GameObject<G,A,R>>
-
-