Example usage for org.jfree.data.time.ohlc OHLCItem getHighValue

List of usage examples for org.jfree.data.time.ohlc OHLCItem getHighValue

Introduction

In this page you can find the example usage for org.jfree.data.time.ohlc OHLCItem getHighValue.

Prototype

public double getHighValue() 

Source Link

Document

Returns the high value.

Usage

From source file:org.jfree.data.time.ohlc.OHLCSeries.java

/**
 * Adds a data item to the series.  The values from the item passed to
 * this method will be copied into a new object.
 * //  w ww  .  ja v a 2  s.  com
 * @param item  the item (<code>null</code> not permitted).
 * 
 * @since 1.0.17
 */
public void add(OHLCItem item) {
    ParamChecks.nullNotPermitted(item, "item");
    add(item.getPeriod(), item.getOpenValue(), item.getHighValue(), item.getLowValue(), item.getCloseValue());
}

From source file:org.jfree.data.time.ohlc.OHLCItemTest.java

/**
 * Some checks for the constructor.//  ww  w . ja  v  a 2 s . co m
 */
@Test
public void testConstructor1() {
    OHLCItem item1 = new OHLCItem(new Year(2006), 2.0, 4.0, 1.0, 3.0);
    assertEquals(new Year(2006), item1.getPeriod());
    assertEquals(2.0, item1.getOpenValue(), EPSILON);
    assertEquals(4.0, item1.getHighValue(), EPSILON);
    assertEquals(1.0, item1.getLowValue(), EPSILON);
    assertEquals(3.0, item1.getCloseValue(), EPSILON);
}

From source file:org.jfree.data.time.ohlc.OHLCSeriesCollection.java

/**
 * Returns the high-value for an item within a series.
 *
 * @param series  the series index./* ww  w  .  j a v  a  2s  . c om*/
 * @param item  the item index.
 *
 * @return The high-value.
 */
@Override
public double getHighValue(int series, int item) {
    OHLCSeries s = (OHLCSeries) this.data.get(series);
    OHLCItem di = (OHLCItem) s.getDataItem(item);
    return di.getHighValue();
}