|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.freecol.common.model.Map.CircleIterator
public final class Map.CircleIterator
An interator returning positions in a spiral starting at a given center tile. The center tile is never included in the positions returned, and all returned positions are valid.
Map.Position
Constructor Summary | |
---|---|
Map.CircleIterator(Map.Position center,
boolean isFilled,
int radius)
The constructor to use. |
Method Summary | |
---|---|
int |
getCurrentRadius()
Returns the current radius of the circle. |
boolean |
hasNext()
Determine if the iterator has another position in it. |
Map.Position |
nextPosition()
Obtains the next position. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Map.CircleIterator(Map.Position center, boolean isFilled, int radius)
center
- The center of the circleisFilled
- True to get all of the positions within the circleradius
- The radius of the circleMethod Detail |
---|
public int getCurrentRadius()
CircleIterator
was initialized with.public boolean hasNext()
true
of there is another position and
false
otherwise.public Map.Position nextPosition()
valid
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |