public class

TimePeriodValuesCollection

extends AbstractIntervalXYDataset
implements Serializable DomainInfo IntervalXYDataset
java.lang.Object
   ↳ org.jfree.data.general.AbstractDataset
     ↳ org.jfree.data.general.AbstractSeriesDataset
       ↳ org.jfree.data.xy.AbstractXYDataset
         ↳ org.jfree.data.xy.AbstractIntervalXYDataset
           ↳ org.jfree.data.time.TimePeriodValuesCollection

Class Overview

A collection of TimePeriodValues objects.

This class implements the XYDataset interface, as well as the extended IntervalXYDataset interface. This makes it a convenient dataset for use with the XYPlot class.

Summary

Public Constructors
TimePeriodValuesCollection()
Constructs an empty dataset.
TimePeriodValuesCollection(TimePeriodValues series)
Constructs a dataset containing a single series.
Public Methods
void addSeries(TimePeriodValues series)
Adds a series to the collection.
boolean equals(Object obj)
Tests this instance for equality with an arbitrary object.
Range getDomainBounds(boolean includeInterval)
Returns the range of the values in this dataset's domain.
boolean getDomainIsPointsInTime()
This method is deprecated. This flag is no longer used by JFreeChart (as of version 1.0.3).
double getDomainLowerBound(boolean includeInterval)
Returns the minimum x-value in the dataset.
double getDomainUpperBound(boolean includeInterval)
Returns the maximum x-value in the dataset.
Number getEndX(int series, int item)
Returns the ending X value for the specified series and item.
Number getEndY(int series, int item)
Returns the ending Y value for the specified series and item.
int getItemCount(int series)
Returns the number of items in the specified series.
TimePeriodValues getSeries(int series)
Returns a series.
int getSeriesCount()
Returns the number of series in the collection.
Comparable getSeriesKey(int series)
Returns the key for a series.
Number getStartX(int series, int item)
Returns the starting X value for the specified series and item.
Number getStartY(int series, int item)
Returns the starting Y value for the specified series and item.
Number getX(int series, int item)
Returns the x-value for the specified series and item.
TimePeriodAnchor getXPosition()
Returns the position of the X value within each time period.
Number getY(int series, int item)
Returns the y-value for the specified series and item.
void removeSeries(TimePeriodValues series)
Removes the specified series from the collection.
void removeSeries(int index)
Removes a series from the collection.
void setDomainIsPointsInTime(boolean flag)
This method is deprecated. This flag is no longer used by JFreeChart (as of version 1.0.3).
void setXPosition(TimePeriodAnchor position)
Sets the position of the x axis within each time period.
[Expand]
Inherited Methods
From class org.jfree.data.xy.AbstractIntervalXYDataset
From class org.jfree.data.xy.AbstractXYDataset
From class org.jfree.data.general.AbstractSeriesDataset
From class org.jfree.data.general.AbstractDataset
From class java.lang.Object
From interface java.io.ObjectInputValidation
From interface org.jfree.data.DomainInfo
From interface org.jfree.data.general.Dataset
From interface org.jfree.data.general.SeriesChangeListener
From interface org.jfree.data.general.SeriesDataset
From interface org.jfree.data.xy.IntervalXYDataset
From interface org.jfree.data.xy.XYDataset

Public Constructors

public TimePeriodValuesCollection ()

Constructs an empty dataset.

public TimePeriodValuesCollection (TimePeriodValues series)

Constructs a dataset containing a single series. Additional series can be added.

Parameters
series the series (null ignored).

Public Methods

public void addSeries (TimePeriodValues series)

Adds a series to the collection. A DatasetChangeEvent is sent to all registered listeners.

Parameters
series the time series.

public boolean equals (Object obj)

Tests this instance for equality with an arbitrary object.

Parameters
obj the object (null permitted).
Returns
  • A boolean.

public Range getDomainBounds (boolean includeInterval)

Returns the range of the values in this dataset's domain.

Parameters
includeInterval a flag that determines whether or not the x-interval is taken into account.
Returns
  • The range.

public boolean getDomainIsPointsInTime ()

This method is deprecated.
This flag is no longer used by JFreeChart (as of version 1.0.3).

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. If true, then only the x-values are considered for the max and min values. If false, 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.

Parameters
includeInterval a flag that determines whether or not the x-interval is taken into account.
Returns
  • The minimum value.

public double getDomainUpperBound (boolean includeInterval)

Returns the maximum x-value in the dataset.

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.

Parameters
series the series (zero-based index).
item the item (zero-based index).
Returns
  • The ending X value for the specified series and item.

public Number getEndY (int series, int item)

Returns the ending Y value for the specified series and item.

Parameters
series the series (zero-based index).
item the item (zero-based index).
Returns
  • The ending Y value for the specified series and item.

public int getItemCount (int series)

Returns the number of items in the specified series.

This method is provided for convenience.

Parameters
series the index of the series of interest (zero-based).
Returns
  • The number of items in the specified series.

public TimePeriodValues 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.

Returns
  • The series count.

public Comparable getSeriesKey (int series)

Returns the key for a series.

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.

Parameters
series the series (zero-based index).
item the item (zero-based index).
Returns
  • The starting X value for the specified series and item.

public Number getStartY (int series, int item)

Returns the starting Y value for the specified series and item.

Parameters
series the series (zero-based index).
item the item (zero-based index).
Returns
  • The starting Y value for the specified series and item.

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 x-value for the specified series and item.

public TimePeriodAnchor getXPosition ()

Returns the position of the X value within each time period.

Returns
  • The position (never null).

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 y-value for the specified series and item.

public void removeSeries (TimePeriodValues series)

Removes the specified series from the collection.

Parameters
series the series to remove (null not permitted).

public void removeSeries (int index)

Removes a series from the collection.

Parameters
index the series index (zero-based).

public void setDomainIsPointsInTime (boolean flag)

This method is deprecated.
This flag is no longer used by JFreeChart (as of version 1.0.3).

Sets a flag that controls whether the domain is treated as 'points in time', or time periods.

Parameters
flag the new value of the flag.

public void setXPosition (TimePeriodAnchor position)

Sets the position of the x axis within each time period.

Parameters
position the position (null not permitted).
See Also