OpenConcerto

Dépôt officiel du code source de l'ERP OpenConcerto
sonarqube

svn://code.openconcerto.org/openconcerto

Rev

Rev 41 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 41 Rev 156
Line 139... Line 139...
139
    }
139
    }
140
 
140
 
141
    protected final Cell<D> getValidCellAt(int col) {
141
    protected final Cell<D> getValidCellAt(int col) {
142
        final Cell<D> c = this.getCellAt(col);
142
        final Cell<D> c = this.getCellAt(col);
143
        if (!c.isValid())
143
        if (!c.isValid())
144
            throw new IllegalArgumentException("invalid cell " + c);
144
            throw new IllegalArgumentException("invalid cell at column " + col + " (in " + this + ") : " + c);
145
        return c;
145
        return c;
146
    }
146
    }
147
 
147
 
148
    public final MutableCell<D> getMutableCellAt(final int col) {
148
    public final MutableCell<D> getMutableCellAt(final int col) {
149
        final Cell<D> c = this.getValidCellAt(col);
149
        final Cell<D> c = this.getValidCellAt(col);
Line 206... Line 206...
206
        this.cells = Arrays.copyOfRange(this.cells, 0, firstIndex + movedCount);
206
        this.cells = Arrays.copyOfRange(this.cells, 0, firstIndex + movedCount);
207
        this.cellCount = this.cells.length;
207
        this.cellCount = this.cells.length;
208
        assert this.getCellCount() == this.getSheet().getColumnCount();
208
        assert this.getCellCount() == this.getSheet().getColumnCount();
209
    }
209
    }
210
 
210
 
-
 
211
    @Override
-
 
212
    public String toString() {
-
 
213
        final int firstY = this.getY();
-
 
214
        final int lastY = this.getLastY();
-
 
215
        final String suffix = firstY == lastY ? "" : " through " + lastY;
-
 
216
        return this.getClass().getSimpleName() + " with " + this.getCellCount() + " cell(s) at index " + firstY + suffix;
-
 
217
    }
211
}
218
}