Examples of indexOf()


Examples of org.jfree.data.time.ohlc.OHLCSeries.indexOf()

    public void testIndexOf() {
        OHLCSeries s1 = new OHLCSeries("s1");
        s1.add(new Year(2006), 2.0, 4.0, 1.0, 3.0);
        s1.add(new Year(2011), 2.0, 4.0, 1.0, 3.0);
        s1.add(new Year(2010), 2.0, 4.0, 1.0, 3.0);
        assertEquals(0, s1.indexOf(new Year(2006)));
        assertEquals(1, s1.indexOf(new Year(2010)));
        assertEquals(2, s1.indexOf(new Year(2011)));
    }

    /**
 
View Full Code Here

Examples of org.jfree.data.xy.DefaultIntervalXYDataset.indexOf()

    /**
     * Some checks for the indexOf(Comparable) method.
     */
    public void testIndexOf() {
        DefaultIntervalXYDataset 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));
    }

View Full Code Here

Examples of org.jfree.data.xy.DefaultWindDataset.indexOf()

    /**
     * Some checks for the indexOf(Comparable) method.
     */
    public void testIndexOf() {
        DefaultWindDataset d = createSampleDataset1();
        assertEquals(0, d.indexOf("Series 1"));
        assertEquals(1, d.indexOf("Series 2"));
        assertEquals(-1, d.indexOf("Green Eggs and Ham"));
        assertEquals(-1, d.indexOf(null));
    }

View Full Code Here

Examples of org.jfree.data.xy.DefaultXYDataset.indexOf()

    /**
     * Some checks for the indexOf(Comparable) method.
     */
    public void testIndexOf() {
        DefaultXYDataset 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));
    }

View Full Code Here

Examples of org.jfree.data.xy.DefaultXYZDataset.indexOf()

    /**
     * Some checks for the indexOf(Comparable) method.
     */
    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));
    }

View Full Code Here

Examples of org.jfree.data.xy.VectorSeries.indexOf()

    public void testIndexOf() {
        VectorSeries s1 = new VectorSeries("Series 1");
        s1.add(1.0, 1.0, 1.0, 2.0);
        s1.add(2.0, 2.0, 2.0, 3.0);
        s1.add(3.0, 3.0, 3.0, 4.0);
        assertEquals(0, s1.indexOf(new XYCoordinate(1.0, 1.0)));
    }

    /**
     * A check for the indexOf() method for an unsorted series.
     */
 
View Full Code Here

Examples of org.jfree.data.xy.XIntervalSeries.indexOf()

    public void testIndexOf() {
        XIntervalSeries s1 = new XIntervalSeries("Series 1");
        s1.add(1.0, 1.0, 1.0, 2.0);
        s1.add(2.0, 2.0, 2.0, 3.0);
        s1.add(3.0, 3.0, 3.0, 4.0);
        assertEquals(0, s1.indexOf(new Double(1.0)));
    }

    /**
     * A check for the indexOf() method for an unsorted series.
     */
 
View Full Code Here

Examples of org.jfree.data.xy.XYIntervalSeries.indexOf()

    public void testIndexOf() {
        XYIntervalSeries s1 = new XYIntervalSeries("Series 1");
        s1.add(1.0, 1.0, 1.0, 2.0, 1.9, 2.1);
        s1.add(2.0, 2.0, 2.0, 3.0, 2.9, 3.1);
        s1.add(3.0, 3.0, 3.0, 4.0, 3.9, 4.1);
        assertEquals(0, s1.indexOf(new Double(1.0)));
    }

    /**
     * A check for the indexOf() method for an unsorted series.
     */
 
View Full Code Here

Examples of org.jfree.data.xy.XYIntervalSeriesCollection.indexOf()

      }


      //find series
      final XYIntervalSeries l_xyIntervalSeries;
      final int index = xyIntervalxySeriesDataset.indexOf(seriesName);
      if (index == -1)
      {
        l_xyIntervalSeries = new XYIntervalSeries(seriesName);
        xyIntervalxySeriesDataset.addSeries(l_xyIntervalSeries);
      }
View Full Code Here

Examples of org.jfree.data.xy.XYSeries.indexOf()

    public void testIndexOf() {
        XYSeries s1 = new XYSeries("Series 1");
        s1.add(1.0, 1.0);
        s1.add(2.0, 2.0);
        s1.add(3.0, 3.0);
        assertEquals(0, s1.indexOf(new Double(1.0)));
        assertEquals(1, s1.indexOf(new Double(2.0)));
        assertEquals(2, s1.indexOf(new Double(3.0)));
        assertEquals(-4, s1.indexOf(new Double(99.9)));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.