java.lang.Object | ||
↳ | org.jfree.data.general.Series | |
↳ | org.jfree.data.ComparableObjectSeries |
![]() |
A (possibly ordered) list of (Comparable, Object) data items.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
data | Storage for the data items in the series. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new empty series.
| |||||||||||
Constructs a new series that contains no data.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Removes all data items from the series and, unless the series is
already empty, sends a
SeriesChangeEvent to all registered
listeners. | |||||||||||
Tests this series for equality with an arbitrary object.
| |||||||||||
Returns a flag that controls whether duplicate x-values are allowed.
| |||||||||||
Returns the flag that controls whether the items in the series are
automatically sorted.
| |||||||||||
Returns the number of items in the series.
| |||||||||||
Returns the maximum number of items that will be retained in the series.
| |||||||||||
Returns a hash code.
| |||||||||||
Returns the index of the item with the specified x-value, or a negative
index if the series does not contain an item with that x-value.
| |||||||||||
Removes the item with the specified x-value and sends a
SeriesChangeEvent to all registered listeners. | |||||||||||
Sets the maximum number of items that will be retained in the series.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Adds a data item to the series and, if requested, sends a
SeriesChangeEvent to all registered listeners. | |||||||||||
Adds new data to the series and sends a
SeriesChangeEvent to
all registered listeners. | |||||||||||
Adds new data to the series and, if requested, sends a
SeriesChangeEvent to all registered listeners. | |||||||||||
Deletes a range of items from the series and sends a
SeriesChangeEvent to all registered listeners. | |||||||||||
Return the data item with the specified index.
| |||||||||||
Removes the item at the specified index and sends a
SeriesChangeEvent to all registered listeners. | |||||||||||
Updates an item in the series.
| |||||||||||
Updates the value of an item in the series and sends a
SeriesChangeEvent to all registered listeners. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Creates a new empty series. By default, items added to the series will be sorted into ascending order by x-value, and duplicate x-values will be allowed (these defaults can be modified with another constructor.
key | the series key (null not permitted).
|
---|
Constructs a new series that contains no data. You can specify whether or not duplicate x-values are allowed for the series.
key | the series key (null not permitted). |
---|---|
autoSort | a flag that controls whether or not the items in the series are sorted. |
allowDuplicateXValues | a flag that controls whether duplicate x-values are allowed. |
Removes all data items from the series and, unless the series is
already empty, sends a SeriesChangeEvent
to all registered
listeners.
Tests this series for equality with an arbitrary object.
obj | the object to test against for equality
(null permitted). |
---|
Returns a flag that controls whether duplicate x-values are allowed. This flag can only be set in the constructor.
Returns the flag that controls whether the items in the series are automatically sorted. There is no setter for this flag, it must be defined in the series constructor.
Returns the number of items in the series.
Returns the maximum number of items that will be retained in the series.
The default value is Integer.MAX_VALUE
.
Returns a hash code.
Returns the index of the item with the specified x-value, or a negative index if the series does not contain an item with that x-value. Be aware that for an unsorted series, the index is found by iterating through all items in the series.
x | the x-value (null not permitted). |
---|
Removes the item with the specified x-value and sends a
SeriesChangeEvent
to all registered listeners.
x | the x-value. |
---|
Sets the maximum number of items that will be retained in the series. If you add a new item to the series such that the number of items will exceed the maximum item count, then the first element in the series is automatically removed, ensuring that the maximum item count is not exceeded.
Typically this value is set before the series is populated with data,
but if it is applied later, it may cause some items to be removed from
the series (in which case a SeriesChangeEvent
will be sent to
all registered listeners.
maximum | the maximum number of items for the series. |
---|
Adds a data item to the series and, if requested, sends a
SeriesChangeEvent
to all registered listeners.
item | the (x, y) item (null not permitted). |
---|---|
notify | a flag that controls whether or not a
SeriesChangeEvent is sent to all registered
listeners.
|
Adds new data to the series and sends a SeriesChangeEvent
to
all registered listeners.
Throws an exception if the x-value is a duplicate AND the allowDuplicateXValues flag is false.
x | the x-value (null not permitted). |
---|---|
y | the y-value (null permitted).
|
Adds new data to the series and, if requested, sends a
SeriesChangeEvent
to all registered listeners.
Throws an exception if the x-value is a duplicate AND the allowDuplicateXValues flag is false.
x | the x-value (null not permitted). |
---|---|
y | the y-value (null permitted). |
notify | a flag the controls whether or not a
SeriesChangeEvent is sent to all registered
listeners.
|
Deletes a range of items from the series and sends a
SeriesChangeEvent
to all registered listeners.
start | the start index (zero-based). |
---|---|
end | the end index (zero-based). |
Return the data item with the specified index.
index | the index. |
---|
Removes the item at the specified index and sends a
SeriesChangeEvent
to all registered listeners.
index | the index. |
---|
Updates an item in the series.
x | the x-value (null not permitted). |
---|---|
y | the y-value (null permitted). |
SeriesException | if there is no existing item with the specified x-value. |
---|
Updates the value of an item in the series and sends a
SeriesChangeEvent
to all registered listeners.
index | the item (zero based index). |
---|---|
y | the new value (null permitted).
|