Package microsim.space
Interface ObjectSpaceIterator<E>
-
- All Superinterfaces:
java.util.Iterator<E>
public interface ObjectSpaceIterator<E> extends java.util.Iterator<E>
A specific iterator for grids. For each value read it is possible to know what is its position on the grid with currentX() and currentY() methods.Title: JAS
Description: Java Agent-based Simulation library
Copyright (C) 2002 Michele Sonnessa
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.- Author:
- Michele Sonnessa
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
currentX()
Return the current x position.int
currentY()
Return the current y position.SpacePosition
getGridPosition()
Return the current position.SpacePosition
nextGridPosition()
-
-
-
Method Detail
-
getGridPosition
SpacePosition getGridPosition()
Return the current position.- Returns:
- A IGridPosition object containing the coordinates.
-
nextGridPosition
SpacePosition nextGridPosition()
-
currentX
int currentX()
Return the current x position.- Returns:
- The x coordinate of the last read.
-
currentY
int currentY()
Return the current y position.- Returns:
- The y coordinate of the last read.
-
-