Skip to content
Snippets Groups Projects
CoordinateIterator.java 1.17 KiB
Newer Older
  • Learn to ignore specific revisions
  • Guyslain's avatar
    Guyslain committed
    package matrix;
    
    Guyslain's avatar
    Guyslain committed
    
    import java.util.Iterator;
    import java.util.NoSuchElementException;
    
    
    /**
     * An {@link Iterator} for generating 2D {@link Coordinate}s within a specified width and
     * height range.
     */
    
    Guyslain's avatar
    Guyslain committed
    class CoordinateIterator implements Iterator<Coordinate> {
    
    
        /**
         * Creates a new {@link CoordinateIterator} with the specified width and height.
         *
         * @param width  The width of the coordinate range.
         * @param height The height of the coordinate range.
         */
    
    Guyslain's avatar
    Guyslain committed
        public CoordinateIterator(int width, int height) {
    
    Guyslain's avatar
    Guyslain committed
            // TODO: à compléter
    
    Guyslain's avatar
    Guyslain committed
        }
    
    
        /**
         * Checks if there are more {@link Coordinate}s to iterate over.
         *
         * @return true if there are more {@link Coordinate}s; otherwise, false.
         */
    
    Guyslain's avatar
    Guyslain committed
        @Override
        public boolean hasNext() {
    
    Guyslain's avatar
    Guyslain committed
            // TODO: à compléter
            return false;
    
    Guyslain's avatar
    Guyslain committed
        }
    
    
        /**
         * Returns the next {@link Coordinate} in the iteration.
         *
         * @return The next {@link Coordinate} in the iteration.
         * @throws NoSuchElementException if there are no more {@link Coordinate}s to iterate over.
         */
    
    Guyslain's avatar
    Guyslain committed
        @Override
        public Coordinate next() {
    
    Guyslain's avatar
    Guyslain committed
            // TODO: à compléter
            return null;
    
    Guyslain's avatar
    Guyslain committed
        }
    }