Package 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:
Serializable,Cloneable
A list of (
RegularTimePeriod, open, high, low, close) data items.- See Also:
-
Field Summary
Fields inherited from class org.jfree.data.ComparableObjectSeries
data -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a data item to the series.voidadd(RegularTimePeriod period, double open, double high, double low, double close) Adds a data item to the series.getDataItem(int index) Returns the data item at the specified index.getPeriod(int index) Returns the time period for the specified item.remove(int index) Removes the item with the specified index.Methods inherited from class org.jfree.data.ComparableObjectSeries
add, add, add, clear, clone, delete, equals, getAllowDuplicateXValues, getAutoSort, getItemCount, getMaximumItemCount, hashCode, indexOf, remove, setMaximumItemCount, update, updateByIndexMethods inherited from class org.jfree.data.general.Series
addChangeListener, addPropertyChangeListener, addVetoableChangeListener, canEqual, firePropertyChange, fireSeriesChanged, fireVetoableChange, getDescription, getKey, getNotify, isEmpty, notifyListeners, removeChangeListener, removePropertyChangeListener, removeVetoableChangeListener, setDescription, setKey, setNotify
-
Constructor Details
-
OHLCSeries
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 (nullnot permitted).
-
-
Method Details
-
getPeriod
Returns the time period for the specified item.- Parameters:
index- the item index.- Returns:
- The time period.
-
getDataItem
Returns the data item at the specified index.- Overrides:
getDataItemin classComparableObjectSeries- Parameters:
index- the item index.- Returns:
- The data item.
-
add
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.
-
add
Adds a data item to the series. The values from the item passed to this method will be copied into a new object.- Parameters:
item- the item (nullnot permitted).
-
remove
Removes the item with the specified index.- Overrides:
removein classComparableObjectSeries- Parameters:
index- the item index.- Returns:
- The item removed.
-