Package java.util

Examples of java.util.List.removeAll()


     */
    private void assertSameRoles(Role[] expected, Collection roles) {
        assertTrue("Expected " + expected.length + " roles, got " + roles.size() + "!", expected.length == roles.size());
       
        List e = new ArrayList(Arrays.asList(expected));
        e.removeAll(roles);
       
        assertTrue("Not seen: " + e, e.isEmpty());
    }
}
View Full Code Here


            // create a list from the expected collection and remove
            // all values from the actual collection, this should get
            // an empty collection
            List eList = new ArrayList( eColl );
            eList.removeAll( aColl );
            assertTrue( "Collections do not match. expected:" + eColl + ", actual: " + aColl, eList.isEmpty() );
        }
        else
        {
            assertEquals( expected, actual );
View Full Code Here

        if (expected != null) {
            assertNotNull(obtained);
            assertEquals(expected.length, obtained.length);
           
            List e = new ArrayList(Arrays.asList(expected));
            e.removeAll(Arrays.asList(obtained));
           
            assertTrue("Roles not obtained: " + e, e.isEmpty());
           
            Map m = new HashMap();
            for (int i = 0; i < expected.length; i++) {
View Full Code Here

    } else if (arg0 instanceof Collection) {
      Collection left = (Collection) arg0;
      Collection right = (Collection) arg1;
      List out = new ArrayList(left.size() + right.size());
      out.addAll(left);
      out.removeAll(right);

      return out;
    } else if (arg0 instanceof Float) {
      return (Float)arg0 - (Float)arg1;
    } else if (arg0 instanceof Double) {
View Full Code Here

            pluginDescriptor.setClassRealm( pluginContainer.getContainerRealm() );

            List unresolved = new ArrayList( dependencies );

            unresolved.removeAll( resolved );

            if ( getLogger().isDebugEnabled() )
            {
                // list all artifacts that were filtered out during the resolution process.
                // these are already present in the core container.
View Full Code Here

            }
            // there are exclusions in the configuration
            List exclusions = Arrays.asList(conf.substring(2).split("\\!"));

            List ret = new ArrayList(Arrays.asList(getDescriptor().getPublicConfigurationsNames()));
            ret.removeAll(exclusions);

            return (String[]) ret.toArray(new String[ret.size()]);
        }
        return dependencyConfigurations;
    }
View Full Code Here

                methodAttrs.addElement(exceptAttr);
            } else {
                // add those exceptions not already present
                final List foundEx = foundExceptAttr.getExceptions();
                final List newEx = exceptAttr.getExceptions();
                newEx.removeAll(foundEx);
                foundEx.addAll(newEx);
            }
        }
       
        // notify controller of class change
View Full Code Here

            pluginDescriptor.setClassRealm( pluginContainer.getContainerRealm() );

            List unresolved = new ArrayList( dependencies );

            unresolved.removeAll( resolved );

            if ( getLogger().isDebugEnabled() )
            {
                // list all artifacts that were filtered out during the resolution process.
                // these are already present in the core container.
View Full Code Here

                            // Removing objects from list for old Shipping and Handling Charges Adjustment and Sales Tax Adjustment.
                            duplicateAdjustmentList.add(orderAdjustment);
                        }
                    }
                }
                orderAdjustments.removeAll(duplicateAdjustmentList);
            }
        } catch (GenericServiceException exc) {
            request.setAttribute("_ERROR_MESSAGE_", exc.getMessage());
            return "error";
        }
View Full Code Here

        public boolean removeAll(Collection o) {
            if (fast) {
                synchronized (FastArrayList.this) {
                    ArrayList temp = (ArrayList) list.clone();
                    List sub = get(temp);
                    boolean r = sub.removeAll(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.