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

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

Introduction

In this page you can find the example usage for org.jfree.data.xy VectorSeries getItemCount.

Prototype

@Override
public int getItemCount() 

Source Link

Document

Returns the number of items in the series.

Usage

From source file:org.jfree.data.xy.VectorSeriesTest.java

/**
 * Simple test for the remove() method./*w w  w.  j  a v  a  2 s. com*/
 */
@Test
public void testRemove() {
    VectorSeries s1 = new VectorSeries("Series 1");
    s1.add(1.0, 1.0, 1.0, 2.0);
    s1.add(3.0, 3.0, 3.0, 3.0);
    s1.add(2.0, 2.0, 2.0, 2.0);
    assertEquals(3, s1.getItemCount());

    s1.remove(new XYCoordinate(2.0, 2.0));
    assertEquals(3.0, s1.getXValue(1), EPSILON);

    s1.remove(new XYCoordinate(1.0, 1.0));
    assertEquals(3.0, s1.getXValue(0), EPSILON);
}