| Prev Class | Next Class | Frames | No Frames |
| Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Objectorg.jfree.data.general.AbstractDatasetorg.jfree.data.general.AbstractSeriesDatasetorg.jfree.data.xy.AbstractXYDatasetorg.jfree.data.xy.AbstractIntervalXYDatasetorg.jfree.data.time.TimeSeriesCollectionpublic class TimeSeriesCollectionextends AbstractIntervalXYDatasetimplements XYDataset, IntervalXYDataset, DomainInfo, SerializableXYDataset interface, as well as the extended
IntervalXYDataset interface. This makes it a convenient dataset for
use with the XYPlot class.
Constructor Summary | |
| |
| |
| |
| |
Method Summary | |
void |
|
boolean |
|
Range |
|
boolean |
|
double |
|
DomainOrder |
|
double |
|
Number |
|
Number |
|
int |
|
List |
|
TimeSeries |
|
TimeSeries |
|
int |
|
Comparable |
|
Number |
|
Number |
|
int[] |
|
Number |
|
protected long |
|
TimePeriodAnchor |
|
double |
|
Number |
|
int |
|
int |
|
void |
|
void |
|
void |
|
void |
|
void |
|
Methods inherited from class org.jfree.data.xy.AbstractIntervalXYDataset | |
getEndXValue, getEndYValue, getStartXValue, getStartYValue | |
Methods inherited from class org.jfree.data.xy.AbstractXYDataset | |
getDomainOrder, getXValue, getYValue | |
Methods inherited from class org.jfree.data.general.AbstractSeriesDataset | |
getSeriesCount, getSeriesKey, indexOf, seriesChanged | |
Methods inherited from class org.jfree.data.general.AbstractDataset | |
addChangeListener, clone, fireDatasetChanged, getGroup, hasListener, notifyListeners, removeChangeListener, setGroup, validateObject | |
public TimeSeriesCollection()
Constructs an empty dataset, tied to the default timezone.
public TimeSeriesCollection(TimeZone zone)
Constructs an empty dataset, tied to a specific timezone.
- Parameters:
zone- the timezone (nullpermitted, will useTimeZone.getDefault()in that case).
public TimeSeriesCollection(TimeSeries series)
Constructs a dataset containing a single series (more can be added), tied to the default timezone.
- Parameters:
series- the series (nullpermitted).
public TimeSeriesCollection(TimeSeries series, TimeZone zone)
Constructs a dataset containing a single series (more can be added), tied to a specific timezone.
- Parameters:
series- a series to add to the collection (nullpermitted).zone- the timezone (nullpermitted, will useTimeZone.getDefault()in that case).
public void addSeries(TimeSeries series)
Adds a series to the collection and sends aDatasetChangeEventto all registered listeners.
- Parameters:
series- the series (nullnot permitted).
public boolean equals(Object obj)
Tests this time series collection for equality with another object.
- Parameters:
obj- the other object.
- Returns:
- A boolean.
public Range getDomainBounds(boolean includeInterval)
Returns the range of the values in this dataset's domain.
- Specified by:
- getDomainBounds in interface DomainInfo
- Parameters:
includeInterval- a flag that determines whether or not the x-interval is taken into account.
- Returns:
- The range.
public boolean getDomainIsPointsInTime()
Deprecated. This flag is no longer used (as of 1.0.1).
Returns a flag that controls whether the domain is treated as 'points in time'. This flag is used when determining the max and min values for the domain. Iftrue, then only the x-values are considered for the max and min values. Iffalse, then the start and end x-values will also be taken into consideration.
- Returns:
- The flag.
public double getDomainLowerBound(boolean includeInterval)
Returns the minimum x-value in the dataset.
- Specified by:
- getDomainLowerBound in interface DomainInfo
- Parameters:
includeInterval- a flag that determines whether or not the x-interval is taken into account.
- Returns:
- The minimum value.
public DomainOrder getDomainOrder()
Returns the order of the domain values in this dataset.
- Specified by:
- getDomainOrder in interface XYDataset
- Overrides:
- getDomainOrder in interface AbstractXYDataset
- Returns:
DomainOrder.ASCENDING
public double getDomainUpperBound(boolean includeInterval)
Returns the maximum x-value in the dataset.
- Specified by:
- getDomainUpperBound in interface DomainInfo
- Parameters:
includeInterval- a flag that determines whether or not the x-interval is taken into account.
- Returns:
- The maximum value.
public Number getEndX(int series, int item)
Returns the ending X value for the specified series and item.
- Specified by:
- getEndX in interface IntervalXYDataset
- Parameters:
series- The series (zero-based index).item- The item (zero-based index).
- Returns:
- The value.
public Number getEndY(int series, int item)
Returns the ending Y value for the specified series and item.
- Specified by:
- getEndY in interface IntervalXYDataset
- Parameters:
series- te series (zero-based index).item- the item (zero-based index).
- Returns:
- The value (possibly
null).
public int getItemCount(int series)
Returns the number of items in the specified series. This method is provided for convenience.
- Specified by:
- getItemCount in interface XYDataset
- Parameters:
series- the series index (zero-based).
- Returns:
- The item count.
public List getSeries()
Returns a list of all the series in the collection.
- Returns:
- The list (which is unmodifiable).
public TimeSeries getSeries(Comparable key)
Returns the series with the specified key, ornullif there is no such series.
- Parameters:
key- the series key (nullpermitted).
- Returns:
- The series with the given key.
public TimeSeries getSeries(int series)
Returns a series.
- Parameters:
series- the index of the series (zero-based).
- Returns:
- The series.
public int getSeriesCount()
Returns the number of series in the collection.
- Specified by:
- getSeriesCount in interface SeriesDataset
- Overrides:
- getSeriesCount in interface AbstractSeriesDataset
- Returns:
- The series count.
public Comparable getSeriesKey(int series)
Returns the key for a series.
- Specified by:
- getSeriesKey in interface SeriesDataset
- Overrides:
- getSeriesKey in interface AbstractSeriesDataset
- Parameters:
series- the index of the series (zero-based).
- Returns:
- The key for a series.
public Number getStartX(int series, int item)
Returns the starting X value for the specified series and item.
- Specified by:
- getStartX in interface IntervalXYDataset
- Parameters:
series- the series (zero-based index).item- the item (zero-based index).
- Returns:
- The value.
public Number getStartY(int series, int item)
Returns the starting Y value for the specified series and item.
- Specified by:
- getStartY in interface IntervalXYDataset
- Parameters:
series- the series (zero-based index).item- the item (zero-based index).
- Returns:
- The value (possibly
null).
public int[] getSurroundingItems(int series, long milliseconds)
Returns the indices of the two data items surrounding a particular millisecond value.
- Parameters:
series- the series index.milliseconds- the time.
- Returns:
- An array containing the (two) indices of the items surrounding the time.
public Number getX(int series, int item)
Returns the x-value for the specified series and item.
- Parameters:
series- the series (zero-based index).item- the item (zero-based index).
- Returns:
- The value.
protected long getX(RegularTimePeriod period)
Returns the x-value for a time period.
- Parameters:
period- the time period (nullnot permitted).
- Returns:
- The x-value.
public TimePeriodAnchor getXPosition()
Returns the position within each time period that is used for the X value when the collection is used as anXYDataset.
- Returns:
- The anchor position (never
null).
public double getXValue(int series, int item)
Returns the x-value (as a double primitive) for an item within a series.
- Overrides:
- getXValue in interface AbstractXYDataset
- Parameters:
series- the series (zero-based index).item- the item (zero-based index).
- Returns:
- The x-value.
public Number getY(int series, int item)
Returns the y-value for the specified series and item.
- Parameters:
series- the series (zero-based index).item- the item (zero-based index).
- Returns:
- The value (possibly
null).
public int indexOf(TimeSeries series)
Returns the index of the specified series, or -1 if that series is not present in the dataset.
- Parameters:
series- the series (nullnot permitted).
- Returns:
- The series index.
- Since:
- 1.0.6
public void removeAllSeries()
Removes all the series from the collection and sends aDatasetChangeEventto all registered listeners.
public void removeSeries(int index)
Removes a series from the collection.
- Parameters:
index- the series index (zero-based).
public void removeSeries(TimeSeries series)
Removes the specified series from the collection and sends aDatasetChangeEventto all registered listeners.
- Parameters:
series- the series (nullnot permitted).
public void setDomainIsPointsInTime(boolean flag)
Deprecated. This flag is no longer used, as of 1.0.1. The
includeIntervalflag in methods such asgetDomainBounds(boolean)makes this unnecessary.Sets a flag that controls whether the domain is treated as 'points in time', or time periods.
- Parameters:
flag- the flag.
public void setXPosition(TimePeriodAnchor anchor)
Sets the position within each time period that is used for the X values when the collection is used as anXYDataset, then sends aDatasetChangeEventis sent to all registered listeners.
- Parameters:
anchor- the anchor position (nullnot permitted).