Package edu.umd.cloud9.util.array

Examples of edu.umd.cloud9.util.array.ArrayListOfFloats.indexOf()


    ArrayListOfDoubles list = new ArrayListOfDoubles();
    for ( int i=0; i<10; i++) {
      list.add((double) i);
    }

    list.remove(list.indexOf(5.0));
    assertEquals(9, list.size());
    assertEquals(0.0, list.get(0), 10e-6);
    assertEquals(1.0, list.get(1), 10e-6);
    assertEquals(2.0, list.get(2), 10e-6);
    assertEquals(3.0, list.get(3), 10e-6);
View Full Code Here


    assertEquals(6.0, list.get(5), 10e-6);
    assertEquals(7.0, list.get(6), 10e-6);
    assertEquals(8.0, list.get(7), 10e-6);
    assertEquals(9.0, list.get(8), 10e-6);

    list.remove(list.indexOf((short) 9));
    assertEquals(8, list.size);
    assertEquals(0.0, list.get(0), 10e-6);
    assertEquals(1.0, list.get(1), 10e-6);
    assertEquals(2.0, list.get(2), 10e-6);
    assertEquals(3.0, list.get(3), 10e-6);
View Full Code Here

    ArrayListOfFloats list = new ArrayListOfFloats();
    for ( int i=0; i<10; i++) {
      list.add((float) i);
    }

    list.remove(list.indexOf(5.0f));
    assertEquals(9, list.size());
    assertEquals(0.0f, list.get(0), 10e-6);
    assertEquals(1.0f, list.get(1), 10e-6);
    assertEquals(2.0f, list.get(2), 10e-6);
    assertEquals(3.0f, list.get(3), 10e-6);
View Full Code Here

    assertEquals(6.0f, list.get(5), 10e-6);
    assertEquals(7.0f, list.get(6), 10e-6);
    assertEquals(8.0f, list.get(7), 10e-6);
    assertEquals(9.0f, list.get(8), 10e-6);

    list.remove(list.indexOf((short) 9));
    assertEquals(8, list.size);
    assertEquals(0.0f, list.get(0), 10e-6);
    assertEquals(1.0f, list.get(1), 10e-6);
    assertEquals(2.0f, list.get(2), 10e-6);
    assertEquals(3.0f, list.get(3), 10e-6);
View Full Code Here

    ArrayListOfShorts list = new ArrayListOfShorts();
    for ( int i=0; i<10; i++) {
      list.add((short) i);
    }

    list.remove(list.indexOf((short) 5));
    assertEquals(9, list.size());
    assertEquals(0, list.get(0));
    assertEquals(1, list.get(1));
    assertEquals(2, list.get(2));
    assertEquals(3, list.get(3));
View Full Code Here

    assertEquals(6, list.get(5));
    assertEquals(7, list.get(6));
    assertEquals(8, list.get(7));
    assertEquals(9, list.get(8));

    list.remove(list.indexOf((short) 9));
    assertEquals(8, list.size);
    assertEquals(0, list.get(0));
    assertEquals(1, list.get(1));
    assertEquals(2, list.get(2));
    assertEquals(3, list.get(3));
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.