| java.lang.Object org.jfree.data.general.AbstractDataset org.jfree.data.general.DefaultPieDataset
All known Subclasses: org.jfree.data.jdbc.JDBCPieDataset, org.jfree.data.general.DefaultKeyedValuesDataset,
Method Summary | |
public void | clear() Clears all data from this dataset and sends a
DatasetChangeEvent to all registered listeners (unless the dataset was already empty). | public Object | clone() Returns a clone of the dataset. | public boolean | equals(Object obj) Tests if this object is equal to another.
Parameters: obj - the other object. | public int | getIndex(Comparable key) Returns the index for a key, or -1 if the key is not recognised.
Parameters: key - the key (null not permitted). | public int | getItemCount() Returns the number of items in the dataset. | public Comparable | getKey(int item) Returns the key for the specified item, or null . | public List | getKeys() Returns the categories in the dataset. | public Number | getValue(int item) Returns a value.
Parameters: item - the value index. | public Number | getValue(Comparable key) Returns the data value associated with a key.
Parameters: key - the key (null not permitted). | public int | hashCode() Returns a hash code. | public void | insertValue(int position, Comparable key, double value) 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. | public void | insertValue(int position, Comparable key, Number value) 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. | public void | remove(Comparable key) Removes an item from the dataset and sends a
DatasetChangeEvent to all registered listeners. | public void | setValue(Comparable key, Number value) Sets the data value for a key and sends a
DatasetChangeEvent to
all registered listeners. | public void | setValue(Comparable key, double value) Sets the data value for a key and sends a
DatasetChangeEvent to
all registered listeners. | public void | sortByKeys(SortOrder order) Sorts the dataset's items by key and sends a
DatasetChangeEvent to all registered listeners. | public void | sortByValues(SortOrder order) Sorts the dataset's items by value and sends a
DatasetChangeEvent to all registered listeners. |
DefaultPieDataset | public DefaultPieDataset()(Code) | | Constructs a new dataset, initially empty.
|
DefaultPieDataset | public DefaultPieDataset(KeyedValues data)(Code) | | Creates a new dataset by copying data from a
KeyedValues
instance.
Parameters: data - the data (null not permitted). |
clear | public void clear()(Code) | | Clears all data from this dataset and sends a
DatasetChangeEvent to all registered listeners (unless the dataset was already empty).
since: 1.0.2 |
equals | public boolean equals(Object obj)(Code) | | Tests if this object is equal to another.
Parameters: obj - the other object. A boolean. |
getIndex | public int getIndex(Comparable key)(Code) | | Returns the index for a key, or -1 if the key is not recognised.
Parameters: key - the key (null not permitted). The index, or -1 if the key is unrecognised. throws: IllegalArgumentException - if key is null . |
getItemCount | public int getItemCount()(Code) | | Returns the number of items in the dataset.
The item count. |
getKey | public Comparable getKey(int item)(Code) | | Returns the key for the specified item, or null .
Parameters: item - the item index (in the range 0 to getItemCount() - 1 ). The key, or null . throws: IndexOutOfBoundsException - if item is not in thespecified range. |
getKeys | public List getKeys()(Code) | | Returns the categories in the dataset. The returned list is
unmodifiable.
The categories in the dataset. |
getValue | public Number getValue(int item)(Code) | | Returns a value.
Parameters: item - the value index. The value (possibly null ). |
getValue | public Number getValue(Comparable key)(Code) | | Returns the data value associated with a key.
Parameters: key - the key (null not permitted). The value (possibly null ). throws: UnknownKeyException - if the key is not recognised. |
hashCode | public int hashCode()(Code) | | Returns a hash code.
A hash code. |
insertValue | public void insertValue(int position, Comparable key, double value)(Code) | | 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. After the change
is made, this methods sends a
DatasetChangeEvent to all
registered listeners.
Parameters: position - the position (in the range 0 to getItemCount()). Parameters: key - the key (null not permitted). Parameters: value - the value (null permitted). since: 1.0.6 |
insertValue | public void insertValue(int position, Comparable key, Number value)(Code) | | 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. After the change
is made, this methods sends a
DatasetChangeEvent to all
registered listeners.
Parameters: position - the position (in the range 0 to getItemCount()). Parameters: key - the key (null not permitted). Parameters: value - the value (null permitted). since: 1.0.6 |
sortByKeys | public void sortByKeys(SortOrder order)(Code) | | Sorts the dataset's items by key and sends a
DatasetChangeEvent to all registered listeners.
Parameters: order - the sort order (null not permitted). since: 1.0.3 |
sortByValues | public void sortByValues(SortOrder order)(Code) | | Sorts the dataset's items by value and sends a
DatasetChangeEvent to all registered listeners.
Parameters: order - the sort order (null not permitted). since: 1.0.3 |
|
|