@Test public void testIterator() { Iterator iterator = grid.iterator(); int cellCount = 0; while (iterator.hasNext()) { iterator.next(); cellCount++; } assertEquals(grid.size(), cellCount); }
@Override public Iterator<Point> iterator() { return new GridIterator(this); }
Grid implements Iterable<Grid.Point> { @Override public Iterator<Point> iterator() { return new GridIterator(this); } }
Grid implements Iterable<Grid.Point> { @Override public Iterator<Point> iterator() { return new GridIterator(this); } Grid(final int padding,
                final int iconSize,
                final int rows,
                final int cols); }
Grid implements Iterable<Grid.Point> { @Override public Iterator<Point> iterator() { return new GridIterator(this); } Grid(final int padding,
                final int iconSize,
                final int rows,
                final int cols); Point findPosition(final Point anchorPoint,
                              final Direction direction); Point findPosition(final int row,
                              final int col); @Override Iterator<Point> iterator(); int getRows(); int getCols(); int size(); int getWidth(); int getHeight(); }
Grid implements Iterable<Grid.Point> { @Override public Iterator<Point> iterator() { return new GridIterator(this); } Grid(final int padding,
                final int iconSize,
                final int rows,
                final int cols); Point findPosition(final Point anchorPoint,
                              final Direction direction); Point findPosition(final int row,
                              final int col); @Override Iterator<Point> iterator(); int getRows(); int getCols(); int size(); int getWidth(); int getHeight();  }