@Override
        public Iterator<Cell<V>> iterator() {
            return new Iterator<Cell<V>>() {
                private MutableCell<V> cell = new MutableCell<V>();
                private int count;
                private int current = -1;

                @Override
                public boolean hasNext() {
                    return (count < grid.size);
                }
                @Override
                public Cell<V> next() {
                    if (hasNext() == false) {
                        throw new NoSuchElementException("No more elements");
                    }
                    current++;
                    for ( ; current < grid.values.length; current++) {
                        if (grid.values[current] != null) {
                            break;
                        }
                    }
                    V value = grid.values[current];
                    count++;
                    cell.set(current / grid.columnCount, current % grid.columnCount, value);
                    return cell;
                }
                @Override
                public void remove() {
                    if (current < 0) {
                        throw new IllegalStateException("Unable to remove, next() not called yet");
                    }
                    if (grid.values[current] == null) {
                        throw new IllegalStateException("Unable to remove, element has been removed");
                    }
                    grid.values[current] = null;
                    grid.size--;
                    count--;
                }
            };
        }