Example usage for org.jfree.data.xy DefaultXYZDataset indexOf

List of usage examples for org.jfree.data.xy DefaultXYZDataset indexOf

Introduction

In this page you can find the example usage for org.jfree.data.xy DefaultXYZDataset indexOf.

Prototype

@Override
public int indexOf(Comparable seriesKey) 

Source Link

Document

Returns the index of the series with the specified key, or -1 if there is no such series in the dataset.

Usage

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

/**
 * Some checks for the indexOf(Comparable) method.
 *///from w  w  w .j  a va 2 s  .c o m
@Test
public void testIndexOf() {
    DefaultXYZDataset d = createSampleDataset1();
    assertEquals(0, d.indexOf("S1"));
    assertEquals(1, d.indexOf("S2"));
    assertEquals(-1, d.indexOf("Green Eggs and Ham"));
    assertEquals(-1, d.indexOf(null));
}

From source file:org.jfree.data.xy.junit.DefaultXYZDatasetTest.java

/**
 * Some checks for the indexOf(Comparable) method.
 *//*from  w w  w.j  a  v a 2  s. c om*/
public void testIndexOf() {
    DefaultXYZDataset d = createSampleDataset1();
    assertEquals(0, d.indexOf("S1"));
    assertEquals(1, d.indexOf("S2"));
    assertEquals(-1, d.indexOf("Green Eggs and Ham"));
    assertEquals(-1, d.indexOf(null));
}