Examples of indexOf()


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

     */
    public void testIndexOf() {
        XYSeries s1 = new XYSeries("S1");
        XYSeries s2 = new XYSeries("S2");
        XYSeriesCollection dataset = new XYSeriesCollection();
        assertEquals(-1, dataset.indexOf(s1));
        assertEquals(-1, dataset.indexOf(s2));

        dataset.addSeries(s1);
        assertEquals(0, dataset.indexOf(s1));
        assertEquals(-1, dataset.indexOf(s2));
View Full Code Here

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

    public void testIndexOf() {
        YIntervalSeries s1 = new YIntervalSeries("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.jruby.util.ByteList.indexOf()

                if (pos == ss.realSize) {
                    return runtime.getNil();
                }
            }

            int ix = ss.indexOf(sep, (int)pos);

            ByteList add;
            if (-1 == ix) {
                ix = internal.getByteList().realSize;
                add = new ByteList(new byte[0], false);
View Full Code Here

Examples of org.jsoup.select.Elements.indexOf()

        elements = doc.select("div.passed span.step-keyword");
        List<String> backgroundStepKeywords = new ArrayList<String>();
        List<String> firstScenarioStepKeywords = new ArrayList<String>();
        for (Element element : elements) {
            int index = elements.indexOf(element);
            if (index < 3) {
                backgroundStepKeywords.add(element.text());
            } else if (index >= 3 && index < 10) {
                firstScenarioStepKeywords.add(element.text());
            } else {
View Full Code Here

Examples of org.luaj.vm2.LuaString.indexOf()

      {
        LuaValue tostring = LuaThread.getGlobals().get("tostring");
        for ( int i=1, n=args.narg(); i<=n; i++ ) {
          if ( i>1 ) baselib.STDOUT.write( '\t' );
          LuaString s = tostring.call( args.arg(i) ).strvalue();
          int z = s.indexOf((byte)0, 0);
          baselib.STDOUT.write( s.m_bytes, s.m_offset, z>=0? z: s.m_length );
        }
        baselib.STDOUT.println();
        return NONE;
      }
View Full Code Here

Examples of org.mcarthur.sandy.gwt.event.list.client.EventList.indexOf()

        final EventList el = EventLists.eventList();
        el.addAll(all);
        final RangedEventList rel = EventLists.rangedEventList(el);


        assertEquals(0, el.indexOf("one"));
        assertEquals(1, el.indexOf("two"));

        rel.setStart(1);
        assertEquals(-1, rel.indexOf("one"));
        assertEquals(0, rel.indexOf("two"));
View Full Code Here

Examples of org.mcarthur.sandy.gwt.event.list.client.RangedEventList.indexOf()

        assertEquals(0, el.indexOf("one"));
        assertEquals(1, el.indexOf("two"));

        rel.setStart(1);
        assertEquals(-1, rel.indexOf("one"));
        assertEquals(0, rel.indexOf("two"));
    }

    public void testRemoveAll() {
        super.testRemoveAll();
View Full Code Here

Examples of org.mcarthur.sandy.gwt.event.list.client.SortedEventList.indexOf()

        sel.add(I20);
        sel.add(I5);
        sel.add(I10);

        assertEquals(0, sel.indexOf(I5));
        assertEquals(1, sel.indexOf(I10));
        assertEquals(2, sel.indexOf(I20));
        assertEquals(-1, sel.indexOf(I0));
    }
View Full Code Here

Examples of org.mozilla.javascript.NativeArray.indexOf()

    String replayStr = xhr.getResponseText();
    ScriptableObject replay = ww.construct("Replay",
        new Object[] { replayStr });
    ScriptableObject meta = (ScriptableObject) replay.get("meta", replay);
    NativeArray playernames = (NativeArray) meta.get("playernames", meta);
    int userIndex = playernames.indexOf(botInput.getPlayer());
    if (userIndex == -1) {
      System.err.println(botInput.getPlayer()
          + " does not exist in the replay");
      System.exit(1);
    } else if (botInput.getMin() < 1
View Full Code Here

Examples of org.netbeans.modules.schema2beans.BaseBean.indexOf()

        boolean root = isRootElement(baseBean);
        if(!root){
            String name = baseBean.name();
            BaseBean parent = baseBean.parent();
            if(parent != null) {
                index = parent.indexOf(name, baseBean);
            }
        }
        return index;
    }   
   
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.