public class DefaultOHLCDataset extends AbstractXYDataset implements OHLCDataset, org.jfree.util.PublicCloneable
OHLCDataset
interface. This
implementation supports only one series.Constructor and Description |
---|
DefaultOHLCDataset(Comparable key,
OHLCDataItem[] data)
Creates a new dataset.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Returns an independent copy of this dataset.
|
boolean |
equals(Object obj)
Tests this instance for equality with an arbitrary object.
|
Number |
getClose(int series,
int item)
Returns the close value.
|
double |
getCloseValue(int series,
int item)
Returns the close-value (as a double primitive) for an item within a
series.
|
Number |
getHigh(int series,
int item)
Returns the high value.
|
double |
getHighValue(int series,
int item)
Returns the high-value (as a double primitive) for an item within a
series.
|
int |
getItemCount(int series)
Returns the item count for the specified series.
|
Number |
getLow(int series,
int item)
Returns the low value.
|
double |
getLowValue(int series,
int item)
Returns the low-value (as a double primitive) for an item within a
series.
|
Number |
getOpen(int series,
int item)
Returns the open value.
|
double |
getOpenValue(int series,
int item)
Returns the open-value (as a double primitive) for an item within a
series.
|
int |
getSeriesCount()
Returns the series count.
|
Comparable |
getSeriesKey(int series)
Returns the series key.
|
Number |
getVolume(int series,
int item)
Returns the trading volume.
|
double |
getVolumeValue(int series,
int item)
Returns the volume-value (as a double primitive) for an item within a
series.
|
Number |
getX(int series,
int item)
Returns the x-value for a data item.
|
Date |
getXDate(int series,
int item)
Returns the x-value for a data item as a date.
|
Number |
getY(int series,
int item)
Returns the y-value.
|
void |
sortDataByDate()
Sorts the data into ascending order by date.
|
getDomainOrder, getXValue, getYValue
indexOf, seriesChanged
addChangeListener, getGroup, getNotify, hasListener, removeChangeListener, setGroup, setNotify, validateObject
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDomainOrder, getXValue, getYValue
indexOf
addChangeListener, getGroup, removeChangeListener, setGroup
public DefaultOHLCDataset(Comparable key, OHLCDataItem[] data)
key
- the series key.data
- the data items.public Comparable getSeriesKey(int series)
getSeriesKey
in interface SeriesDataset
getSeriesKey
in class AbstractSeriesDataset
series
- the series index (ignored).public Number getX(int series, int item)
public Date getXDate(int series, int item)
series
- the series index (ignored).item
- the item index (zero-based).public Number getY(int series, int item)
public Number getHigh(int series, int item)
getHigh
in interface OHLCDataset
series
- the series index (ignored).item
- the item index (zero-based).public double getHighValue(int series, int item)
getHighValue
in interface OHLCDataset
series
- the series (zero-based index).item
- the item (zero-based index).public Number getLow(int series, int item)
getLow
in interface OHLCDataset
series
- the series index (ignored).item
- the item index (zero-based).public double getLowValue(int series, int item)
getLowValue
in interface OHLCDataset
series
- the series (zero-based index).item
- the item (zero-based index).public Number getOpen(int series, int item)
getOpen
in interface OHLCDataset
series
- the series index (ignored).item
- the item index (zero-based).public double getOpenValue(int series, int item)
getOpenValue
in interface OHLCDataset
series
- the series (zero-based index).item
- the item (zero-based index).public Number getClose(int series, int item)
getClose
in interface OHLCDataset
series
- the series index (ignored).item
- the item index (zero-based).public double getCloseValue(int series, int item)
getCloseValue
in interface OHLCDataset
series
- the series (zero-based index).item
- the item (zero-based index).public Number getVolume(int series, int item)
getVolume
in interface OHLCDataset
series
- the series index (ignored).item
- the item index (zero-based).public double getVolumeValue(int series, int item)
getVolumeValue
in interface OHLCDataset
series
- the series (zero-based index).item
- the item (zero-based index).public int getSeriesCount()
getSeriesCount
in interface SeriesDataset
getSeriesCount
in class AbstractSeriesDataset
public int getItemCount(int series)
getItemCount
in interface XYDataset
series
- the series index (ignored).public void sortDataByDate()
public boolean equals(Object obj)
public Object clone() throws CloneNotSupportedException
clone
in interface org.jfree.util.PublicCloneable
clone
in class AbstractDataset
CloneNotSupportedException
- if there is a cloning problem.Jas4pp 1.5 © Java Analysis Studio for Particle Physics