Package squidpony.squidgrid.iterator
Class SquidIterators.BottomLeftToTopRight
java.lang.Object
squidpony.squidgrid.iterator.SquidIterators.BottomLeftToTopRight
- All Implemented Interfaces:
Iterator<Coord>
,SquidIterator
- Enclosing class:
- SquidIterators
public static class SquidIterators.BottomLeftToTopRight extends Object implements SquidIterator
Iterator that starts from the bottom left element of the grid, to the top
right.
- Author:
- smelC
-
Field Details
-
Constructor Details
-
BottomLeftToTopRight
A fresh iterator.- Parameters:
width
- The grid's width.height
- The grid's height.
-
-
Method Details
-
hasNext
-
next
-
hasAbove
- Returns:
- Whether
above()
would return an element (i.e. not throw an exception).
-
above
- Returns:
- The point above the last point returned by
next()
. - Throws:
IllegalStateException
- Ifnext()
wasn't called before.NoSuchElementException
- If there's no point above the last point returned bynext()
.
-
remove
-
gridIsEmpty
-