Package java.util

Examples of java.util.LinkedList.retainAll()


        Map taskIDPositions = new HashMap();
        for (Iterator i = nodes.iterator(); i.hasNext();) {
            List taskIDs = ((EVTask) i.next()).getTaskIDs();
            if (intersects(taskIDs, bestIDs)) {
                List l = new LinkedList(taskIDs);
                l.retainAll(bestIDs);
                int pos = 0;
                for (Iterator j = l.iterator(); j.hasNext();) {
                    String taskID = (String) j.next();
                    increment(taskIDPositions, taskID, pos++);
                }
View Full Code Here


    public void testDelegatingProxyInterfaceOrder()
    {
        final Echo echo = ( Echo ) factory.createDelegatorProxy( createSingletonEcho(), new Class[] { Echo.class, DuplicateEcho.class } );
        final List expected = new LinkedList( Arrays.asList( new Class[] { Echo.class, DuplicateEcho.class } ) );
        final List actual = new LinkedList( Arrays.asList( echo.getClass().getInterfaces() ) );
        actual.retainAll( expected )// Doesn't alter order!
        assertEquals( expected, actual );
    }

    public void testCreateDelegatingProxy()
    {
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.