/** * Returns the row index for a given key. * * @param key the row key ({@code null} not permitted). * * @return The row index. * * @see #getRowKey(int) */ @Override public int getRowIndex(Comparable key) { // defer null argument check return this.data.getRowIndex(key); }
/** * Returns the row index for a given key. * * @param key the row key (<code>null</code> not permitted). * * @return The row index. * * @see #getRowKey(int) */ public int getRowIndex(Comparable key) { // defer null argument check return this.data.getRowIndex(key); }
int rowIndex = getRowIndex(rowKey);
/** * Returns the value for a given chip x and y or null. * * @param chipx the x-index. * @param chipy the y-index. * * @return The data value. */ public Number getChipValue(Comparable chipx, Comparable chipy) { int rowIndex = this.data.getRowIndex(chipx); if (rowIndex < 0) { return null; } int colIndex = this.data.getColumnIndex(chipy); if (colIndex < 0) { return null; } return this.data.getValue(rowIndex, colIndex); }
int rowIndex = getRowIndex(rowKey);
/** * Returns the value for a given chip x and y or null. * * @param chipx the x-index. * @param chipy the y-index. * * @return The data value. */ public Number getChipValue(Comparable chipx, Comparable chipy) { int rowIndex = this.data.getRowIndex(chipx); if (rowIndex < 0) { return null; } int colIndex = this.data.getColumnIndex(chipy); if (colIndex < 0) { return null; } return this.data.getValue(rowIndex, colIndex); }
/** * Removes a row from the table. * * @param rowKey the row key (<code>null</code> not permitted). * * @see #removeRow(int) * @see #removeColumn(Comparable) * * @throws UnknownKeyException if <code>rowKey</code> is not defined in the * table. */ public void removeRow(Comparable rowKey) { if (rowKey == null) { throw new IllegalArgumentException("Null 'rowKey' argument."); } int index = getRowIndex(rowKey); if (index >= 0) { removeRow(index); } else { throw new UnknownKeyException("Unknown key: " + rowKey); } }
int row = getRowIndex(rowKey); if (row >= 0) { DefaultKeyedValues rowData
/** * Removes a row from the table. * * @param rowKey the row key ({@code null} not permitted). * * @see #removeRow(int) * @see #removeColumn(Comparable) * * @throws UnknownKeyException if {@code rowKey} is not defined in the * table. */ public void removeRow(Comparable rowKey) { Args.nullNotPermitted(rowKey, "rowKey"); int index = getRowIndex(rowKey); if (index >= 0) { removeRow(index); } else { throw new UnknownKeyException("Unknown key: " + rowKey); } }
int rowIndex = getRowIndex(rowKey); DefaultKeyedValues row = (DefaultKeyedValues) this.rows.get(rowIndex);
int rowIndex = getRowIndex(rowKey); DefaultKeyedValues row = (DefaultKeyedValues) this.rows.get(rowIndex);
int row = getRowIndex(rowKey); if (row >= 0) { DefaultKeyedValues rowData