Example usage for org.jfree.data.xy XIntervalSeriesCollection getSeries

List of usage examples for org.jfree.data.xy XIntervalSeriesCollection getSeries

Introduction

In this page you can find the example usage for org.jfree.data.xy XIntervalSeriesCollection getSeries.

Prototype

public XIntervalSeries getSeries(int series) 

Source Link

Document

Returns a series from the collection.

Usage

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

/**
 * A test for bug report 1170825 (originally affected XYSeriesCollection,
 * this test is just copied over).//from   w  w w.  j av a2 s.c  o m
 */
@Test
public void test1170825() {
    XIntervalSeries s1 = new XIntervalSeries("Series1");
    XIntervalSeriesCollection dataset = new XIntervalSeriesCollection();
    dataset.addSeries(s1);
    try {
        /* XYSeries s = */ dataset.getSeries(1);
    } catch (IllegalArgumentException e) {
        // correct outcome
    } catch (IndexOutOfBoundsException e) {
        assertTrue(false); // wrong outcome
    }
}

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

/**
 * A test for bug report 1170825 (originally affected XYSeriesCollection,
 * this test is just copied over).//from   www . ja  va 2  s. co  m
 */
public void test1170825() {
    XIntervalSeries s1 = new XIntervalSeries("Series1");
    XIntervalSeriesCollection dataset = new XIntervalSeriesCollection();
    dataset.addSeries(s1);
    try {
        /* XYSeries s = */ dataset.getSeries(1);
    } catch (IllegalArgumentException e) {
        // correct outcome
    } catch (IndexOutOfBoundsException e) {
        assertTrue(false); // wrong outcome
    }
}