Class ExitIterator<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
- java.lang.Object
-
- net.sf.gridarta.gui.map.mapactions.ExitIterator<G,A,R>
-
- All Implemented Interfaces:
java.util.Iterator<G>
public class ExitIterator<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>AnIteratorthat returns all map squares containing an exit game object.
-
-
Constructor Summary
Constructors Constructor Description ExitIterator(@NotNull ExitMatcher<G,A,R> exitMatcher, @NotNull MapModel<G,A,R> mapModel, int xStart, int yStart, int direction)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasNext()Gnext()voidremove()
-
-
-
Constructor Detail
-
ExitIterator
public ExitIterator(@NotNull @NotNull ExitMatcher<G,A,R> exitMatcher, @NotNull @NotNull MapModel<G,A,R> mapModel, int xStart, int yStart, int direction)Creates a new instance.- Parameters:
exitMatcher- the exit matcher for selecting exit game objectsmapModel- the map model to searchxStart- the x coordinate to start seacrhingyStart- the y coordinate to start seacrhingdirection- the search direction:-1for backward or+1for forward
-
-
Method Detail
-
hasNext
public boolean hasNext()
- Specified by:
hasNextin interfacejava.util.Iterator<G extends GameObject<G,A,R>>
-
next
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>>
-
-