public class

OHLCSeriesCollection

extends AbstractXYDataset
implements Serializable OHLCDataset
java.lang.Object
   ↳ org.jfree.data.general.AbstractDataset
     ↳ org.jfree.data.general.AbstractSeriesDataset
       ↳ org.jfree.data.xy.AbstractXYDataset
         ↳ org.jfree.data.time.ohlc.OHLCSeriesCollection

Class Overview

A collection of OHLCSeries objects.

See Also

Summary

Public Constructors
OHLCSeriesCollection()
Creates a new instance of OHLCSeriesCollection.
Public Methods
void addSeries(OHLCSeries series)
Adds a series to the collection and sends a DatasetChangeEvent to all registered listeners.
Object clone()
Returns a clone of this instance.
boolean equals(Object obj)
Tests this instance for equality with an arbitrary object.
Number getClose(int series, int item)
Returns the close-value for an item within a series.
double getCloseValue(int series, int item)
Returns the close-value for an item within a series.
Number getHigh(int series, int item)
Returns the high-value for an item within a series.
double getHighValue(int series, int item)
Returns the high-value for an item within a series.
int getItemCount(int series)
Returns the number of items in the specified series.
Number getLow(int series, int item)
Returns the low-value for an item within a series.
double getLowValue(int series, int item)
Returns the low-value for an item within a series.
Number getOpen(int series, int item)
Returns the open-value for an item within a series.
double getOpenValue(int series, int item)
Returns the open-value for an item within a series.
OHLCSeries getSeries(int series)
Returns a series from the collection.
int getSeriesCount()
Returns the number of series in the collection.
Comparable getSeriesKey(int series)
Returns the key for a series.
Number getVolume(int series, int item)
Returns null always, because this dataset doesn't record any volume data.
double getVolumeValue(int series, int item)
Returns Double.NaN always, because this dataset doesn't record any volume data.
Number getX(int series, int item)
Returns the x-value for an item within a series.
TimePeriodAnchor getXPosition()
Returns the position within each time period that is used for the X value when the collection is used as an XYDataset.
double getXValue(int series, int item)
Returns the x-value for an item within a series.
Number getY(int series, int item)
Returns the y-value for an item within a series.
void setXPosition(TimePeriodAnchor anchor)
Sets the position within each time period that is used for the X values when the collection is used as an XYDataset, then sends a DatasetChangeEvent is sent to all registered listeners.
Protected Methods
synchronized long getX(RegularTimePeriod period)
Returns the x-value for a time period.
[Expand]
Inherited Methods
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.general.Dataset
From interface org.jfree.data.general.SeriesChangeListener
From interface org.jfree.data.general.SeriesDataset
From interface org.jfree.data.xy.OHLCDataset
From interface org.jfree.data.xy.XYDataset

Public Constructors

public OHLCSeriesCollection ()

Creates a new instance of OHLCSeriesCollection.

Public Methods

public void addSeries (OHLCSeries series)

Adds a series to the collection and sends a DatasetChangeEvent to all registered listeners.

Parameters
series the series (null not permitted).

public Object clone ()

Returns a clone of this instance.

Returns
  • A clone.
Throws
CloneNotSupportedException if there is a problem.

public boolean equals (Object obj)

Tests this instance for equality with an arbitrary object.

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

public Number getClose (int series, int item)

Returns the close-value for an item within a series.

Parameters
series the series index.
item the item index.
Returns
  • The close-value.

public double getCloseValue (int series, int item)

Returns the close-value for an item within a series.

Parameters
series the series index.
item the item index.
Returns
  • The close-value.

public Number getHigh (int series, int item)

Returns the high-value for an item within a series.

Parameters
series the series index.
item the item index.
Returns
  • The high-value.

public double getHighValue (int series, int item)

Returns the high-value for an item within a series.

Parameters
series the series index.
item the item index.
Returns
  • The high-value.

public int getItemCount (int series)

Returns the number of items in the specified series.

Parameters
series the series (zero-based index).
Returns
  • The item count.
Throws
IllegalArgumentException if series is not in the range 0 to getSeriesCount() - 1.

public Number getLow (int series, int item)

Returns the low-value for an item within a series.

Parameters
series the series index.
item the item index.
Returns
  • The low-value.

public double getLowValue (int series, int item)

Returns the low-value for an item within a series.

Parameters
series the series index.
item the item index.
Returns
  • The low-value.

public Number getOpen (int series, int item)

Returns the open-value for an item within a series.

Parameters
series the series index.
item the item index.
Returns
  • The open-value.

public double getOpenValue (int series, int item)

Returns the open-value for an item within a series.

Parameters
series the series index.
item the item index.
Returns
  • The open-value.

public OHLCSeries getSeries (int series)

Returns a series from the collection.

Parameters
series the series index (zero-based).
Returns
  • The series.
Throws
IllegalArgumentException if series is not in the range 0 to getSeriesCount() - 1.

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 series index (in the range 0 to getSeriesCount() - 1).
Returns
  • The key for a series.
Throws
IllegalArgumentException if series is not in the specified range.

public Number getVolume (int series, int item)

Returns null always, because this dataset doesn't record any volume data.

Parameters
series the series index (ignored).
item the item index (ignored).
Returns
  • null.

public double getVolumeValue (int series, int item)

Returns Double.NaN always, because this dataset doesn't record any volume data.

Parameters
series the series index (ignored).
item the item index (ignored).
Returns
  • Double.NaN.

public Number getX (int series, int item)

Returns the x-value for an item within a series.

Parameters
series the series index.
item the item index.
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 an XYDataset.

Returns
  • The anchor position (never null).

public double getXValue (int series, int item)

Returns the x-value for an item within a series.

Parameters
series the series index.
item the item index.
Returns
  • The x-value.

public Number getY (int series, int item)

Returns the y-value for an item within a series.

Parameters
series the series index.
item the item index.
Returns
  • The y-value.

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 an XYDataset, then sends a DatasetChangeEvent is sent to all registered listeners.

Parameters
anchor the anchor position (null not permitted).

Protected Methods

protected synchronized long getX (RegularTimePeriod period)

Returns the x-value for a time period.

Parameters
period the time period (null not permitted).
Returns
  • The x-value.