Example usage for org.jfree.data.time.ohlc OHLCSeries isEmpty

List of usage examples for org.jfree.data.time.ohlc OHLCSeries isEmpty

Introduction

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

Prototype

public boolean isEmpty() 

Source Link

Document

Returns true if the series contains no data items, and false otherwise.

Usage

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

/**
 * Some checks for the clear() method.//from ww w.  j  ava2 s  . c  om
 */
@Test
public void testClear() {
    OHLCSeries s1 = new OHLCSeries("S1");
    s1.addChangeListener(this);
    s1.clear();
    assertNull(this.lastEvent);
    assertTrue(s1.isEmpty());
    s1.add(new Year(2006), 1.0, 1.1, 1.1, 1.1);
    assertFalse(s1.isEmpty());
    s1.clear();
    assertNotNull(this.lastEvent);
    assertTrue(s1.isEmpty());
}