Package microsim.space
Interface ObjectSpaceIterator<E>
- All Superinterfaces:
Iterator<E>
A specific iterator for grids. For each value read it is possible to know what is its position on the grid is with
currentX()
and currentY()
methods.-
Method Details
-
getGridPosition
SpacePosition getGridPosition()Return the current position.- Returns:
- A
SpacePosition
object containing the coordinates.
-
nextGridPosition
SpacePosition nextGridPosition() -
currentX
int currentX()Return the currentx
position.- Returns:
- The
x
coordinate of the last read.
-
currentY
int currentY()Return the currenty
position.- Returns:
- The
y
coordinate of the last read.
-