public static class SquidIterators.BottomLeftToTopRight extends java.lang.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() |
public BottomLeftToTopRight(int width,
int height)
width - The grid's width.height - The grid's height.public boolean hasNext()
hasNext in interface java.util.Iterator<Coord>public boolean hasAbove()
above() would return an element (i.e. not
throw an exception).public Coord above()
public void remove()
remove in interface java.util.Iterator<Coord>protected boolean gridIsEmpty()
Copyright © Eben Howard 2012–2022. All rights reserved.