DefaultCategoryDataset class

  • DefaultCategoryDataset class comes under the org.jfree.data.category package of JFreeChart library.
  • A default implementation of the CategoryDataset interface.
  • Methods present in this class add and set values to the table.

Constructor:

constructorDescription
DefaultCategoryDataset( )It creates new empty dataset.

Method Summary

MethodDescription
addValue(double value, Comparable rowKey, Comparable columnKey)This method adds a value to the table.
addValue(Number value, Comparable rowKey, Comparable columnKey)This method adds a value to the table.
clear( )This method clears all data from the dataset and sends a DatasetChangeEvent to all registered listeners.
equals(Object obj)This method tests this dataset for equality with an arbitrary object.
getColumnCount( )This method returns the number of columns in the table.
getColumnIndex(Comparable key)This method returns the column index for a given key.
getColumnKey(int column)This method returns a column key.
getRowCount( )This method returns the number of rows in the table.
getRowIndex(Comparable key)This method returns the row index for a given key.
getRowKeys( )This method returns the row keys.
getValue(Comparable rowKey, Comparable columnKey)This method returns the value for a pair of keys.
getValue(int row, int column)This method returns a value from the table.
removeColumn(Comparable columnKey)This method removes a column from the dataset and sends a DatasetChangeEvent to all registered listeners.
removeRow(Comparable rowKey)This method removes a row from the dataset and sends a DatasetChangeEvent to all registered listeners.
setValue(double value, Comparable rowKey, Comparable columnKey)This method adds or updates a value in the table and sends a DatasetChangeEvent to all registered listeners.





Latest Courses