/** * Returns a value from the table. * * @param row the row index (zero-based). * @param column the column index (zero-based). * * @return The value (possibly {@code null}). */ @Override public Number getValue(int row, int column) { return this.underlying.getValue(row, column + this.firstCategoryIndex); }
/** * Returns a value from the table. * * @param row the row index (zero-based). * @param column the column index (zero-based). * * @return The value (possibly <code>null</code>). */ public Number getValue(int row, int column) { return this.underlying.getValue(row, column + this.firstCategoryIndex); }
/** * Returns the value for a pair of keys. * * @param rowKey the row key (<code>null</code> not permitted). * @param columnKey the column key (<code>null</code> not permitted). * * @return The value (possibly <code>null</code>). * * @throws UnknownKeyException if either key is not defined in the dataset. */ public Number getValue(Comparable rowKey, Comparable columnKey) { int r = getRowIndex(rowKey); int c = getColumnIndex(columnKey); if (c != -1) { return this.underlying.getValue(r, c + this.firstCategoryIndex); } else { throw new UnknownKeyException("Unknown columnKey: " + columnKey); } }
/** * Returns the value for a pair of keys. * * @param rowKey the row key ({@code null} not permitted). * @param columnKey the column key ({@code null} not permitted). * * @return The value (possibly {@code null}). * * @throws UnknownKeyException if either key is not defined in the dataset. */ @Override public Number getValue(Comparable rowKey, Comparable columnKey) { int r = getRowIndex(rowKey); int c = getColumnIndex(columnKey); if (c == -1) { throw new UnknownKeyException("Unknown columnKey: " + columnKey); } else if (r == -1) { throw new UnknownKeyException("Unknown rowKey: " + rowKey); } else { return this.underlying.getValue(r, c + this.firstCategoryIndex); } }