Package ca.odell.glazedlists

Examples of ca.odell.glazedlists.BasicEventList.subList()


        for(int i = 0; i < 50; i++) {
            eventList.add(new Integer(i + 100));
        }

        // get the sublist
        EventList subListBefore = (EventList)eventList.subList(25, 75);
        ListConsistencyListener.install(subListBefore);

        // change the source list to be 0,1,2,3,...49,50,51,..99,100,101...149
        for(int i = 0; i < 50; i++) {
            eventList.add(50+i, new Integer(50+i));
View Full Code Here


        for(int i = 0; i < 50; i++) {
            eventList.add(50+i, new Integer(50+i));
        }

        // ensure the sublist took the change
        EventList subListAfter = (EventList)eventList.subList(25, 125);
        assertEquals(subListBefore, subListAfter);

        // change the lists again, deleting all odd numbered entries
        for(Iterator i = eventList.iterator(); i.hasNext(); ) {
            Integer current = (Integer)i.next();
View Full Code Here

            Integer current = (Integer)i.next();
            if(current.intValue() % 2 == 1) i.remove();
        }

        // ensure the sublists took the change
        subListAfter = (EventList)eventList.subList(13, 63);
        assertEquals(subListBefore, subListAfter);
       
        // make some set calls
        eventList.set(15, "Fifteen");
        eventList.set(18, "Eighteen");
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.