java.lang.Object | ||
↳ | org.jfree.data.general.AbstractDataset | |
↳ | org.jfree.data.general.DefaultPieDataset |
![]() |
A default implementation of the PieDataset
interface.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a new dataset, initially empty.
| |||||||||||
Creates a new dataset by copying data from a
KeyedValues
instance. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Clears all data from this dataset and sends a
DatasetChangeEvent
to all registered listeners (unless the dataset was already empty). | |||||||||||
Returns a clone of the dataset.
| |||||||||||
Tests if this object is equal to another.
| |||||||||||
Returns the index for a key, or -1 if the key is not recognised.
| |||||||||||
Returns the number of items in the dataset.
| |||||||||||
Returns the key for the specified item, or
null . | |||||||||||
Returns the categories in the dataset.
| |||||||||||
Returns a value.
| |||||||||||
Returns the data value associated with a key.
| |||||||||||
Returns a hash 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.
| |||||||||||
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.
| |||||||||||
Removes an item from the dataset and sends a
DatasetChangeEvent
to all registered listeners. | |||||||||||
Sets the data value for a key and sends a
DatasetChangeEvent to
all registered listeners. | |||||||||||
Sets the data value for a key and sends a
DatasetChangeEvent to
all registered listeners. | |||||||||||
Sorts the dataset's items by key and sends a
DatasetChangeEvent
to all registered listeners. | |||||||||||
Sorts the dataset's items by value and sends a
DatasetChangeEvent
to all registered listeners. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Constructs a new dataset, initially empty.
Creates a new dataset by copying data from a KeyedValues
instance.
data | the data (null not permitted).
|
---|
Clears all data from this dataset and sends a DatasetChangeEvent
to all registered listeners (unless the dataset was already empty).
Returns a clone of the dataset.
CloneNotSupportedException | This class will not throw this exception, but subclasses (if any) might. |
---|
Tests if this object is equal to another.
obj | the other object. |
---|
Returns the index for a key, or -1 if the key is not recognised.
key | the key (null not permitted). |
---|
-1
if the key is unrecognised.IllegalArgumentException | if key is
null .
|
---|
Returns the number of items in the dataset.
Returns the key for the specified item, or null
.
item | the item index (in the range 0 to
getItemCount() - 1 ). |
---|
null
.IndexOutOfBoundsException | if item is not in the
specified range.
|
---|
Returns the categories in the dataset. The returned list is unmodifiable.
Returns a value.
item | the value index. |
---|
null
).
Returns the data value associated with a key.
key | the key (null not permitted). |
---|
null
).UnknownKeyException | if the key is not recognised. |
---|
Returns a hash 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.
position | the position (in the range 0 to getItemCount()). |
---|---|
key | the key (null not permitted). |
value | the value (null permitted). |
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.
position | the position (in the range 0 to getItemCount()). |
---|---|
key | the key (null not permitted). |
value | the value (null permitted). |
Removes an item from the dataset and sends a DatasetChangeEvent
to all registered listeners.
key | the key (null not permitted). |
---|
IllegalArgumentException | if key is
null .
|
---|
Sets the data value for a key and sends a DatasetChangeEvent
to
all registered listeners.
key | the key (null not permitted). |
---|---|
value | the value. |
IllegalArgumentException | if key is
null .
|
---|
Sets the data value for a key and sends a DatasetChangeEvent
to
all registered listeners.
key | the key (null not permitted). |
---|---|
value | the value. |
IllegalArgumentException | if key is
null .
|
---|
Sorts the dataset's items by key and sends a DatasetChangeEvent
to all registered listeners.
order | the sort order (null not permitted). |
---|
Sorts the dataset's items by value and sends a DatasetChangeEvent
to all registered listeners.
order | the sort order (null not permitted). |
---|