/** * Creates a new dataset. */ public DefaultBoxAndWhiskerCategoryDataset() { this.data = new KeyedObjects2D(); this.minimumRangeValue = Double.NaN; this.minimumRangeValueRow = -1; this.minimumRangeValueColumn = -1; this.maximumRangeValue = Double.NaN; this.maximumRangeValueRow = -1; this.maximumRangeValueColumn = -1; }
/** * Returns a clone of this dataset. * * @return A clone of this dataset. * * @throws CloneNotSupportedException if cloning cannot be completed. */ public Object clone() throws CloneNotSupportedException { DefaultStatisticalCategoryDataset clone = (DefaultStatisticalCategoryDataset) super.clone(); clone.data = (KeyedObjects2D) this.data.clone(); return clone; } }
/** * Tests this dataset for equality with an arbitrary object. * * @param obj the object ({@code null} permitted). * * @return A boolean. */ @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof DefaultMultiValueCategoryDataset)) { return false; } DefaultMultiValueCategoryDataset that = (DefaultMultiValueCategoryDataset) obj; return this.data.equals(that.data); }
/** * Removes an entire column from the table. * * @param columnIndex the column index. * * @see #removeRow(int) */ public void removeColumn(int columnIndex) { Comparable columnKey = getColumnKey(columnIndex); removeColumn(columnKey); }
if (!getRowKeys().equals(that.getRowKeys())) { return false; if (!getColumnKeys().equals(that.getColumnKeys())) { return false; int rowCount = getRowCount(); if (rowCount != that.getRowCount()) { return false; int colCount = getColumnCount(); if (colCount != that.getColumnCount()) { return false; Object v1 = getObject(r, c); Object v2 = that.getObject(r, c); if (v1 == null) { if (v2 != null) {
/** * Return an item from within the dataset. * * @param row the row index. * @param column the column index. * * @return The item. */ public BoxAndWhiskerItem getItem(int row, int column) { return (BoxAndWhiskerItem) this.data.getObject(row, column); }
MeanAndStandardDeviation item = new MeanAndStandardDeviation( mean, standardDeviation); this.data.addObject(item, rowKey, columnKey); int r = this.data.getColumnIndex(columnKey); int c = this.data.getRowIndex(rowKey); if ((r == this.maximumRangeValueRow && c == this.maximumRangeValueColumn) || (r
int rowIndex = getRowIndex(rowKey); if (rowIndex < 0) { throw new UnknownKeyException("Row key (" + rowKey + ") not recognised."); int columnIndex = getColumnIndex(columnKey); if (columnIndex < 0) { throw new UnknownKeyException("Column key (" + columnKey + ") not recognised."); setObject(null, rowKey, columnKey);
this.minimumRangeValueIncStdDevColumn = -1; int rowCount = this.data.getRowCount(); int columnCount = this.data.getColumnCount(); for (int r = 0; r < rowCount; r++) { for (int c = 0; c < columnCount; c++) { MeanAndStandardDeviation masd = (MeanAndStandardDeviation) this.data.getObject(r, c); if (masd == null) { continue;
/** * Returns the column index for a given key. * * @param key the column key. * * @return The column index. */ @Override public int getColumnIndex(Comparable key) { return this.data.getColumnIndex(key); }
/** * Returns the column keys. * * @return The keys. */ @Override public List getColumnKeys() { return this.data.getColumnKeys(); }
/** * Returns the number of columns in the table. * * @return The column count. * * @see #getRowCount() */ @Override public int getColumnCount() { return this.data.getColumnCount(); }
/** * Returns a column key. * * @param column the column index (zero-based). * * @return The column key. */ @Override public Comparable getColumnKey(int column) { return this.data.getColumnKey(column); }
/** * Clears all data from the dataset and sends a {@link DatasetChangeEvent} * to all registered listeners. * * @since 1.0.7 */ public void clear() { this.data.clear(); updateBounds(); fireDatasetChanged(); }
this.data.addObject(vlist, rowKey, columnKey);
if (!getRowKeys().equals(that.getRowKeys())) { return false; if (!getColumnKeys().equals(that.getColumnKeys())) { return false; int rowCount = getRowCount(); if (rowCount != that.getRowCount()) { return false; int colCount = getColumnCount(); if (colCount != that.getColumnCount()) { return false; Object v1 = getObject(r, c); Object v2 = that.getObject(r, c); if (v1 == null) { if (v2 != null) {
/** * Return an item from within the dataset. * * @param row the row index. * @param column the column index. * * @return The item. */ public BoxAndWhiskerItem getItem(int row, int column) { return (BoxAndWhiskerItem) this.data.getObject(row, column); }
MeanAndStandardDeviation item = new MeanAndStandardDeviation( mean, standardDeviation); this.data.addObject(item, rowKey, columnKey); int r = this.data.getColumnIndex(columnKey); int c = this.data.getRowIndex(rowKey); if ((r == this.maximumRangeValueRow && c == this.maximumRangeValueColumn) || (r
int rowIndex = getRowIndex(rowKey); if (rowIndex < 0) { throw new UnknownKeyException("Row key (" + rowKey + ") not recognised."); int columnIndex = getColumnIndex(columnKey); if (columnIndex < 0) { throw new UnknownKeyException("Column key (" + columnKey + ") not recognised."); setObject(null, rowKey, columnKey);
this.minimumRangeValueIncStdDevColumn = -1; int rowCount = this.data.getRowCount(); int columnCount = this.data.getColumnCount(); for (int r = 0; r < rowCount; r++) { for (int c = 0; c < columnCount; c++) { MeanAndStandardDeviation masd = (MeanAndStandardDeviation) this.data.getObject(r, c); if (masd == null) { continue;