org.jfree.data.time.ohlc
Class OHLCSeries
java.lang.Object
org.jfree.data.general.Series
org.jfree.data.ComparableObjectSeries
org.jfree.data.time.ohlc.OHLCSeries
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable
public class OHLCSeries
- extends ComparableObjectSeries
A list of (RegularTimePeriod, open, high, low, close) data items.
- Since:
- 1.0.4
- See Also:
OHLCSeriesCollection
,
Serialized Form
Constructor Summary |
OHLCSeries(java.lang.Comparable key)
Creates a new empty series. |
Methods inherited from class org.jfree.data.ComparableObjectSeries |
add, add, add, clear, delete, equals, getAllowDuplicateXValues, getAutoSort, getItemCount, getMaximumItemCount, hashCode, indexOf, remove, remove, setMaximumItemCount, update, updateByIndex |
Methods inherited from class org.jfree.data.general.Series |
addChangeListener, addPropertyChangeListener, clone, firePropertyChange, fireSeriesChanged, getDescription, getKey, getNotify, isEmpty, notifyListeners, removeChangeListener, removePropertyChangeListener, setDescription, setKey, setNotify |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
OHLCSeries
public OHLCSeries(java.lang.Comparable key)
- Creates a new empty series. By default, items added to the series will
be sorted into ascending order by period, and duplicate periods will
not be allowed.
- Parameters:
key
- the series key (null
not permitted).
getPeriod
public RegularTimePeriod getPeriod(int index)
- Returns the time period for the specified item.
- Parameters:
index
- the item index.
- Returns:
- The time period.
getDataItem
public ComparableObjectItem getDataItem(int index)
- Returns the data item at the specified index.
- Overrides:
getDataItem
in class ComparableObjectSeries
- Parameters:
index
- the item index.
- Returns:
- The data item.
add
public void add(RegularTimePeriod period,
double open,
double high,
double low,
double close)
- Adds a data item to the series.
- Parameters:
period
- the period.open
- the open-value.high
- the high-value.low
- the low-value.close
- the close-value.
Copyright © 2000-2009 by Object Refinery Limited. All Rights Reserved.