public static class SquidIterators.BottomLeftToTopRight extends Object implements SquidIterator
Modifier and Type | Field and Description |
---|---|
protected int |
height |
protected Coord |
previous
The point whose character was returned by the previous call to
next() , or null if none. |
protected int |
width |
Constructor and Description |
---|
BottomLeftToTopRight(int width,
int height)
A fresh iterator.
|
Modifier and Type | Method and Description |
---|---|
Coord |
above() |
protected boolean |
gridIsEmpty() |
boolean |
hasAbove() |
boolean |
hasNext() |
Coord |
next() |
void |
remove() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining
public BottomLeftToTopRight(int width, int height)
width
- The grid's width.height
- The grid's height.public boolean hasAbove()
above()
would return an element (i.e. not
throw an exception).public Coord above()
next()
.IllegalStateException
- If next()
wasn't called before.NoSuchElementException
- If there's no point above the last point returned by
next()
.protected boolean gridIsEmpty()
Copyright © 2012–2016. All rights reserved.