Example usage for org.jfree.data.xy VectorSeries isEmpty

List of usage examples for org.jfree.data.xy VectorSeries isEmpty

Introduction

In this page you can find the example usage for org.jfree.data.xy VectorSeries 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.xy.VectorSeriesTest.java

/**
 * Some checks for the clear() method.//  ww w .j av  a2s.c o  m
 */
@Test
public void testClear() {
    VectorSeries s1 = new VectorSeries("S1");
    s1.addChangeListener(this);
    s1.clear();
    assertNull(this.lastEvent);
    assertTrue(s1.isEmpty());
    s1.add(1.0, 2.0, 3.0, 4.0);
    assertFalse(s1.isEmpty());
    s1.clear();
    assertNotNull(this.lastEvent);
    assertTrue(s1.isEmpty());
}