public class

OHLCSeries

extends ComparableObjectSeries
java.lang.Object
   ↳ org.jfree.data.general.Series
     ↳ org.jfree.data.ComparableObjectSeries
       ↳ org.jfree.data.time.ohlc.OHLCSeries

Class Overview

A list of (RegularTimePeriod, open, high, low, close) data items.

Summary

[Expand]
Inherited Fields
From class org.jfree.data.ComparableObjectSeries
Public Constructors
OHLCSeries(Comparable key)
Creates a new empty series.
Public Methods
void add(RegularTimePeriod period, double open, double high, double low, double close)
Adds a data item to the series.
ComparableObjectItem getDataItem(int index)
Returns the data item at the specified index.
RegularTimePeriod getPeriod(int index)
Returns the time period for the specified item.
[Expand]
Inherited Methods
From class org.jfree.data.ComparableObjectSeries
From class org.jfree.data.general.Series
From class java.lang.Object

Public Constructors

public OHLCSeries (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).

Public Methods

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.

public ComparableObjectItem getDataItem (int index)

Returns the data item at the specified index.

Parameters
index the item index.
Returns
  • The data item.

public RegularTimePeriod getPeriod (int index)

Returns the time period for the specified item.

Parameters
index the item index.
Returns
  • The time period.