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
SpacePositionobject containing the coordinates.
-
nextGridPosition
SpacePosition nextGridPosition() -
currentX
int currentX()Return the currentxposition.- Returns:
- The
xcoordinate of the last read.
-
currentY
int currentY()Return the currentyposition.- Returns:
- The
ycoordinate of the last read.
-