de.grogra.pf.data
public final class Dataset extends java.lang.Object implements Shareable, java.io.Serializable, Showable
Dataset contains a set of Datacells
which are arranged in a tabular scheme, i.e., in rows and columns.| Constructor and Description |
|---|
Dataset() |
| Modifier and Type | Method and Description |
|---|---|
Dataseries |
addColumn()
Adds a new column to this dataset and returns it as a dataseries.
|
Dataseries |
addColumn(java.lang.Comparable key)
Adds a new column to this dataset and returns it as a dataseries.
|
void |
addReference(SharedObjectReference ref) |
Dataseries |
addRow()
Adds a new row to this dataset and returns it as a dataseries.
|
Dataseries |
addRow(java.lang.Comparable key)
Adds a new row to this dataset and returns it as a dataseries.
|
void |
appendReferencesTo(java.util.List out) |
DatasetAdapter |
asDatasetAdapter()
Returns a view of this dataset as an instance of
DatasetAdapter. |
javax.swing.table.TableModel |
asTableModel()
Returns a view of this dataset as an instance of
TableModel. |
Dataset |
clear()
Clears this dataset.
|
void |
export(java.io.FileWriter file,
java.lang.String separator)
Writes the data of this dataset to the indicated file.
|
static void |
export(Item item,
java.lang.Object info,
Context context) |
java.lang.String |
getCategoryLabel() |
Datacell |
getCell(int row,
int col)
Returns the datacell at
row and column. |
Dataseries |
getColumn(int column)
Returns
column as a dataseries. |
int |
getColumnCount()
Returns the number of columns of this dataset.
|
int |
getColumnCount(int row)
Returns the number of columns which are defined in
row. |
java.lang.Comparable |
getColumnKey(int column)
Returns the key for the column with index
column. |
org.jfree.data.DomainOrder |
getDomainOrder() |
org.jfree.data.general.DatasetGroup |
getGroup() |
SharedObjectProvider |
getProvider() |
Dataseries |
getRow(int row)
Returns
row as a dataseries. |
int |
getRowCount()
Returns the number of rows of this dataset.
|
int |
getRowCount(int column) |
java.lang.Comparable |
getRowKey(int row)
Returns the key for the row with index
row. |
java.lang.String |
getTitle() |
java.lang.String |
getValueLabel() |
boolean |
hasCell(int row,
int col) |
boolean |
hasSeriesInRows() |
void |
initProvider(SharedObjectProvider provider) |
Dataseries |
operator$shl(double[] v) |
Dataseries |
operator$shl(java.lang.Number v) |
void |
removeReference(SharedObjectReference ref) |
Dataset |
setCategoryLabel(java.lang.String s) |
Dataset |
setColumnKey(int col,
java.lang.Comparable key)
Sets the key for column with index
column to key |
void |
setDomainOrder(org.jfree.data.DomainOrder order) |
void |
setGroup(org.jfree.data.general.DatasetGroup group) |
Dataset |
setHistogramBins(int col,
double min,
double max,
int count) |
Dataset |
setHistogramBins(int col,
java.util.List<org.jfree.data.statistics.HistogramBin> bins) |
Dataset |
setRowKey(int row,
java.lang.Comparable key)
Sets the key for row with index
row to key |
Dataset |
setSeriesInRows(boolean value) |
Dataset |
setTitle(java.lang.String s) |
Dataset |
setValueLabel(java.lang.String s) |
void |
show(Context ctx) |
void |
showInPanel(Panel panel) |
HistogramAdapter |
toHistogram()
Returns a histogram of this dataset.
|
StatisticsAdapter |
toStatistics()
Returns a statistics view of this dataset.
|
public static final MimeType MIME_TYPE
public Dataseries addColumn()
public Dataseries addColumn(java.lang.Comparable key)
key - column key to usepublic void addReference(SharedObjectReference ref)
addReference in interface Shareablepublic Dataseries addRow()
public Dataseries addRow(java.lang.Comparable key)
key - row key to usepublic void appendReferencesTo(java.util.List out)
appendReferencesTo in interface Shareablepublic DatasetAdapter asDatasetAdapter()
DatasetAdapter. Note that the meanings of rows
and columns are exchanged.DatasetAdapterpublic javax.swing.table.TableModel asTableModel()
TableModel.TableModelpublic Dataset clear()
public void export(java.io.FileWriter file,
java.lang.String separator)
file - separator - between the items of a columnpublic java.lang.String getCategoryLabel()
public Datacell getCell(int row, int col)
row and column.
The rows and columns are extended if necessary.row - row index of cellcol - column index of cellpublic Dataseries getColumn(int column)
column as a dataseries.column - column indexpublic int getColumnCount()
getColumnCount(int)public int getColumnCount(int row)
row.
The returned value does not exceed getColumnCount().row - row indexrowpublic java.lang.Comparable getColumnKey(int column)
column.
If such a key has not been set explicitly by
setColumnKey(int, Comparable), an instance of
Character is returned, its value being column + 'A'.column - column indexpublic org.jfree.data.DomainOrder getDomainOrder()
public org.jfree.data.general.DatasetGroup getGroup()
public SharedObjectProvider getProvider()
getProvider in interface Shareablepublic Dataseries getRow(int row)
row as a dataseries.row - row indexpublic int getRowCount()
public int getRowCount(int column)
public java.lang.Comparable getRowKey(int row)
row.
If such a key has not been set explicitly by
setRowKey(int, Comparable), an instance of
Integer is returned, its value being row + 1.row - row indexpublic java.lang.String getTitle()
public java.lang.String getValueLabel()
public boolean hasCell(int row,
int col)
public boolean hasSeriesInRows()
public void initProvider(SharedObjectProvider provider)
initProvider in interface Shareablepublic Dataseries operator$shl(double[] v)
public Dataseries operator$shl(java.lang.Number v)
public void removeReference(SharedObjectReference ref)
removeReference in interface Shareablepublic Dataset setCategoryLabel(java.lang.String s)
public Dataset setColumnKey(int col, java.lang.Comparable key)
column to keycol - column indexkey - key for columngetColumnKey(int)public void setDomainOrder(org.jfree.data.DomainOrder order)
public void setGroup(org.jfree.data.general.DatasetGroup group)
public Dataset setHistogramBins(int col, double min, double max, int count)
public Dataset setHistogramBins(int col, java.util.List<org.jfree.data.statistics.HistogramBin> bins)
public Dataset setRowKey(int row, java.lang.Comparable key)
row to keyrow - row indexkey - key for rowgetRowKey(int)public Dataset setSeriesInRows(boolean value)
public Dataset setTitle(java.lang.String s)
public Dataset setValueLabel(java.lang.String s)
public void showInPanel(Panel panel)
public HistogramAdapter toHistogram()
DatasetAdapterpublic StatisticsAdapter toStatistics()
StatisticsAdapter