Examples of FastList


Examples of org.mvel2.util.FastList

    fl.add("value");
    assertEquals(1, fl.size());
  }

  public void testAddAllFastList() throws Exception {
    FastList fl1 = new FastList(1);
    fl1.add("value1");
    fl1.add("value2");
    assertEquals(2, fl1.size());

    FastList fl2 = new FastList(1);
    fl2.add("value3");
    fl2.add("value4");

    // the addAll results in a list of 2 instead of 4 that was expected
    fl1.addAll(fl2);

    assertEquals(4, fl1.size());
View Full Code Here

Examples of org.mvel2.util.FastList

//            assert "Foo244".equals(list.get(0)) && "Foo244".equals(list.get(2)) && list.size() == 10;
//        }
  }

  public static void testJavaList() {
    FastList list;
    for (int i = 0; i < COUNT; i++) {
      list = new FastList(10);

      list.add("Foo244");
      list.add("Bar");

      list.add("Foo244");
      list.add("Bar");

      list.add("Foo244");
      list.add("Bar");

      list.add("Foo244");
      list.add("Bar");

      list.add("Foo244");
      list.add("Bar");

      assert "Foo244".equals(list.get(0)) && "Bar".equals(list.get(1)) && list.size() == 10;
    }

  }
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.