001/** 002 * 003 */ 004package icy.type; 005 006import java.awt.geom.Point2D; 007import java.util.NoSuchElementException; 008 009/** 010 * Position 2D iterator. 011 * 012 * @author Stephane 013 */ 014public interface Position2DIterator 015{ 016 /** 017 * Reset iterator to initial position. 018 */ 019 public void reset(); 020 021 /** 022 * Pass to the next element. 023 * 024 * @exception NoSuchElementException 025 * iteration has no more elements. 026 */ 027 public void next() throws NoSuchElementException; 028 029 /** 030 * Returns <tt>true</tt> if the iterator has no more elements. 031 */ 032 public boolean done(); 033 034 /** 035 * @return the current position of the iterator 036 * @exception NoSuchElementException 037 * iteration has no more elements. 038 */ 039 public Point2D get() throws NoSuchElementException; 040 041 /** 042 * @return the current position X of the iterator 043 */ 044 public int getX() throws NoSuchElementException; 045 046 /** 047 * @return the current position Y of the iterator 048 */ 049 public int getY() throws NoSuchElementException; 050}