public class OHLCSeriesCollection extends AbstractXYDataset implements OHLCDataset, Serializable
OHLCSeries
objects.OHLCSeries
,
Serialized FormConstructor and Description |
---|
OHLCSeriesCollection()
Creates a new instance of
OHLCSeriesCollection . |
Modifier and Type | Method and Description |
---|---|
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.
|
int |
hashCode()
Returns a hash code for this instance.
|
void |
removeAllSeries()
Removes all the series from the collection and sends a
DatasetChangeEvent to all registered listeners. |
void |
removeSeries(int index)
Removes the series with the specified index and sends a
DatasetChangeEvent to all registered listeners. |
boolean |
removeSeries(OHLCSeries series)
Removes the specified series from the dataset and sends a
DatasetChangeEvent to all registered listeners. |
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. |
getDomainOrder, getYValue
indexOf, seriesChanged
addChangeListener, getGroup, getNotify, hasListener, removeChangeListener, setGroup, setNotify, validateObject
getClass, notify, notifyAll, toString, wait, wait, wait
getDomainOrder, getYValue
indexOf
addChangeListener, getGroup, removeChangeListener, setGroup
public OHLCSeriesCollection()
OHLCSeriesCollection
.public TimePeriodAnchor getXPosition()
XYDataset
.null
).public void setXPosition(TimePeriodAnchor anchor)
XYDataset
, then sends a
DatasetChangeEvent
is sent to all registered listeners.anchor
- the anchor position (null
not permitted).public void addSeries(OHLCSeries series)
DatasetChangeEvent
to all registered listeners.series
- the series (null
not permitted).public int getSeriesCount()
getSeriesCount
in interface SeriesDataset
getSeriesCount
in class AbstractSeriesDataset
public OHLCSeries getSeries(int series)
series
- the series index (zero-based).IllegalArgumentException
- if series
is not in the
range 0
to getSeriesCount() - 1
.public Comparable getSeriesKey(int series)
getSeriesKey
in interface SeriesDataset
getSeriesKey
in class AbstractSeriesDataset
series
- the series index (in the range 0
to
getSeriesCount() - 1
).IllegalArgumentException
- if series
is not in the
specified range.public int getItemCount(int series)
getItemCount
in interface XYDataset
series
- the series (zero-based index).IllegalArgumentException
- if series
is not in the
range 0
to getSeriesCount() - 1
.public double getXValue(int series, int item)
getXValue
in interface XYDataset
getXValue
in class AbstractXYDataset
series
- the series index.item
- the item index.public Number getX(int series, int item)
public Number getY(int series, int item)
public double getOpenValue(int series, int item)
getOpenValue
in interface OHLCDataset
series
- the series index.item
- the item index.public Number getOpen(int series, int item)
getOpen
in interface OHLCDataset
series
- the series index.item
- the item index.public double getCloseValue(int series, int item)
getCloseValue
in interface OHLCDataset
series
- the series index.item
- the item index.public Number getClose(int series, int item)
getClose
in interface OHLCDataset
series
- the series index.item
- the item index.public double getHighValue(int series, int item)
getHighValue
in interface OHLCDataset
series
- the series index.item
- the item index.public Number getHigh(int series, int item)
getHigh
in interface OHLCDataset
series
- the series index.item
- the item index.public double getLowValue(int series, int item)
getLowValue
in interface OHLCDataset
series
- the series index.item
- the item index.public Number getLow(int series, int item)
getLow
in interface OHLCDataset
series
- the series index.item
- the item index.public Number getVolume(int series, int item)
null
always, because this dataset doesn't record
any volume data.getVolume
in interface OHLCDataset
series
- the series index (ignored).item
- the item index (ignored).null
.public double getVolumeValue(int series, int item)
Double.NaN
always, because this dataset doesn't
record any volume data.getVolumeValue
in interface OHLCDataset
series
- the series index (ignored).item
- the item index (ignored).Double.NaN
.public void removeSeries(int index)
DatasetChangeEvent
to all registered listeners.index
- the series index.public boolean removeSeries(OHLCSeries series)
DatasetChangeEvent
to all registered listeners.series
- the series (null
not permitted).true
if the series was removed, and
false
otherwise.public void removeAllSeries()
DatasetChangeEvent
to all registered listeners.public boolean equals(Object obj)
public int hashCode()
public Object clone() throws CloneNotSupportedException
clone
in class AbstractDataset
CloneNotSupportedException
- if there is a problem.Jas4pp 1.5 © Java Analysis Studio for Particle Physics