Javatpoint Logo
Javatpoint Logo

DefaultPieDataset Class

  • DefaultPieDataset class is a default implementation of the PieDataset interface.

Constructor:

constructor Description
DefaultPieDataset( ) It constructs a new dataset, initially empty.
DefaultPieDataset(KeyedValues data) It creates a new dataset by copying data from a KeyedValues instance.

Method Summary

Method Description
clear( ) This method clears all data from this dataset and sends a DatasetChangeEvent to all registered listeners (unless the dataset was already empty).
clone( ) This method returns a clone of the dataset.
equals(Object obj) This method tests if this object is equal to another.
getIndex(Comparable key) This method returns the index for a key, or -1 if the key is not recognized.
getItemCount( ) This method returns the number of items in the dataset.
getKeys( ) This method returns the categories in the dataset.
getValue(Comparable key) This method returns the data value associated with a key.
getValue(int item) This method returns a value.
insertValue(int position, Comparable key, double value) This method inserts a new value at the specified position in the dataset or, if there is an existing item with the specified key, updates the value for that item and moves it to the specified position.
setValue(Comparable key, double value) This method sets the data value for a key and sends a DatasetChangeEvent to all registered listeners.
sortByKeys(SortOrder order) This method sorts the dataset's items by key and sends a DatasetChangeEvent to all registered listeners.
sortByValues(SortOrder order) This method sorts the dataset's items by value and sends a DatasetChangeEvent to all registered listeners.





Help Others, Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA