Interface ObjectSpaceIterator<E>

All Superinterfaces:
Iterator<E>

public interface ObjectSpaceIterator<E> extends 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 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.