Class GridIterator.VerticalUp
java.lang.Object
com.github.yellowstonegames.grid.GridIterator
com.github.yellowstonegames.grid.GridIterator.VerticalUp
- Enclosing class:
GridIterator
An iterator to iterate from a starting position (exclusive) and going up.
This iterator cycles when reaching the map's bound, but it iterates at
most once on a cell, i.e. it does at most one roll over a column of the
map.
-
Nested Class Summary
Nested classes/interfaces inherited from class GridIterator
GridIterator.CenteredSquare, GridIterator.SquareSpiral, GridIterator.VerticalUp -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CoordInitially nullprotected intThe starting X-coordinateprotected intThe starting Y-coordinateFields inherited from class GridIterator
height, width -
Constructor Summary
ConstructorsConstructorDescriptionVerticalUp(int xStart, int yStart, int width, int height) An iterator to iterate vertically, starting AFTER(startx, starty).VerticalUp(Coord start, int width, int height) An iterator to iterate vertically, starting AFTERstart. -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Iterator
forEachRemaining
-
Field Details
-
xStart
protected int xStartThe starting X-coordinate -
yStart
protected int yStartThe starting Y-coordinate -
prev
Initially null
-
-
Constructor Details
-
VerticalUp
public VerticalUp(int xStart, int yStart, int width, int height) An iterator to iterate vertically, starting AFTER(startx, starty). This iterates cycles when it reaches the map's bound, but it iterates at most once on a cell, i.e. it does at most one roll over a column of the map.- Parameters:
xStart- The starting X-coordinate.yStart- The starting vertical-coordinate.width- The map's width.height- The map's height.
-
VerticalUp
An iterator to iterate vertically, starting AFTERstart. This iterates cycles when it reaches the map's bound, but it iterates at most once on a cell, i.e. it does at most one roll over a column of the map.- Parameters:
start- The starting coordinate.width- The map's width.height- The map's height.
-
-
Method Details
-
hasNext
public boolean hasNext() -
next
-
remove
public void remove() -
findNext
-