Package java.util

Examples of java.util.List.retainAll()


        public boolean retainAll(Collection o) {
            if (fast) {
                synchronized (FastArrayList.this) {
                    ArrayList temp = (ArrayList) list.clone();
                    List sub = get(temp);
                    boolean r = sub.retainAll(o);
                    if (r) last = first + sub.size();
                    list = temp;
                    expected = temp;
                    return r;
                }
View Full Code Here


                getLeftResultSet().getAllResultColumns(null);
        ResultColumnList rightRCL =
                getRightResultSet().getAllResultColumns(null);

        List columnNames = extractColumnNames(leftRCL);
        columnNames.retainAll(extractColumnNames(rightRCL));

        ResultColumnList commonColumns =
                (ResultColumnList) getNodeFactory().getNode(
                        C_NodeTypes.RESULT_COLUMN_LIST,
                        getContextManager());
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

    }
   
    /** Tests retainAll(Collection c) */
    public void test_retainAll() {
        List a = defaultList();
        a.retainAll(defaultList());
        TestSupport.assertEquals(a, defaultList(),
            "retainAll(<equal List>) does not equal original list");
        a = defaultList();
        a.retainAll(newInstance(null));
        TestSupport.assertThat(a.size() == 0,
View Full Code Here

        List a = defaultList();
        a.retainAll(defaultList());
        TestSupport.assertEquals(a, defaultList(),
            "retainAll(<equal List>) does not equal original list");
        a = defaultList();
        a.retainAll(newInstance(null));
        TestSupport.assertThat(a.size() == 0,
            "retainAll(<empty List>))does not have size of zero");
       
        a = defaultList();
        a.remove(0);
View Full Code Here

                clientClassProperties = Collections.EMPTY_LIST;
            }

            // there is a bug in EOModeler it sometimes keeps outdated properties in
            // the client property list. This removes them
            clientClassProperties.retainAll(classProperties);

            // remove all properties from the entity properties that are already defined
            // in
            // a potential parent class.
            String parentEntity = (String) entityPlistMap.get("parent");
View Full Code Here

                getLeftResultSet().getAllResultColumns(null);
        ResultColumnList rightRCL =
                getRightResultSet().getAllResultColumns(null);

        List columnNames = extractColumnNames(leftRCL);
        columnNames.retainAll(extractColumnNames(rightRCL));

        ResultColumnList commonColumns =
                (ResultColumnList) getNodeFactory().getNode(
                        C_NodeTypes.RESULT_COLUMN_LIST,
                        getContextManager());
View Full Code Here

                clientClassProperties = Collections.EMPTY_LIST;
            }

            // there is a bug in EOModeler it sometimes keeps outdated properties in
            // the client property list. This removes them
            clientClassProperties.retainAll(classProperties);

            // remove all properties from the entity properties that are already defined
            // in
            // a potential parent class.
            String parentEntity = (String) entityPlistMap.get("parent");
View Full Code Here

           
            try
            {
                List groups = new ArrayList(registry.getGroupsForUser(principal.getName()));

                groups.retainAll(roles);
              
                // if authorization succeeds, set the user's Subject on this invocation context
                // so that the rest of the Thread is executed in the context of the appropriate Subject
                if (groups.size() > 0)
                    ContextManagerFactory.getInstance().setCallerSubject(((WSLCPrincipal)principal).getSubject());
View Full Code Here

        public boolean retainAll(Collection o) {
            if (fast) {
                synchronized (FastArrayList.this) {
                    ArrayList temp = (ArrayList) list.clone();
                    List sub = get(temp);
                    boolean r = sub.retainAll(o);
                    if (r) last = first + sub.size();
                    list = temp;
                    expected = temp;
                    return r;
                }
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.