Package java.util

Examples of java.util.Collection.removeAll()


        }

        Collection selectedDependencies = new LinkedHashSet( artifacts );
        DependencyExcluder excluder = new DependencyExcluder( artifacts );
        excluder.processHeaders( excludeDependencies );
        selectedDependencies.removeAll( excluder.getExcludedArtifacts() );

        return selectedDependencies;
    }

View Full Code Here


    // optional operation
    public void testCollectionRemoveAll() {
        Collection c = makeCollection();
        assertTrue("Initial Collection is empty.",c.isEmpty());
        try {
            c.removeAll(c);
        } catch(UnsupportedOperationException e) {
            // expected
        } catch(Throwable t) {
            t.printStackTrace();
            fail("Collection.removeAll should only throw UnsupportedOperationException. Found " + t.toString());
View Full Code Here

        boolean added = tryToAdd(c,"element1");
        if(added) {
            assertTrue("Collection is not empty.",!c.isEmpty());
            try {
                c.removeAll(c);
                assertTrue("Collection is empty.",c.isEmpty());
            } catch(UnsupportedOperationException e) {
                // expected
            } catch(Throwable t) {
                t.printStackTrace();
View Full Code Here

            ancestor.getNode().setResolvedNodes(node.getModuleId(), node.getRootModuleConf(),
                resolved);

            Collection evicted = new HashSet(ancestor.getNode().getEvictedNodes(node.getModuleId(),
                node.getRootModuleConf()));
            evicted.removeAll(resolved);
            evicted.addAll(toevict);
            ancestor.getNode().setEvictedNodes(node.getModuleId(), node.getRootModuleConf(),
                evicted);
            ancestor.getNode().setPendingConflicts(node.getModuleId(), node.getRootModuleConf(),
                Collections.EMPTY_SET);
View Full Code Here

            // it's time to update parent resolved and evicted with what was found

            Collection evicted = new HashSet(ancestor.getNode().getEvictedNodes(node.getModuleId(),
                node.getRootModuleConf()));
            toevict.removeAll(resolved);
            evicted.removeAll(resolved);
            evicted.addAll(toevict);
            evicted.add(node.getNode());
            ancestor.getNode().setEvictedNodes(node.getModuleId(), node.getRootModuleConf(),
                evicted);
            ancestor.getNode().setPendingConflicts(node.getModuleId(), node.getRootModuleConf(),
View Full Code Here

     * @see #analyze()
     */
    public Collection getOrphans() {
        ensureAnalyzed();
        Collection orphans = new HashSet(revisions.keySet());
        orphans.removeAll(dependers.keySet());
        return orphans;
    }

    private ModuleRevisionId[] searchModules() {
        ModuleRevisionId[] mrids = searchEngine.listModules(ModuleRevisionId.newInstance(
View Full Code Here

        Collection props1 = nameSet();
        Collection props2 = properties.nameSet();
       
        // missed in props2.
        Collection tmp = new TreeSet(props1);
        tmp.removeAll(props2);
        for (Iterator props = tmp.iterator(); props.hasNext();) {
            String missing = (String) props.next();
            result.put(missing, (byte[]) null);
        }
View Full Code Here

            result.put(missing, (byte[]) null);
        }

        // added in props2.
        tmp = new TreeSet(props2);
        tmp.removeAll(props1);

        for (Iterator props = tmp.iterator(); props.hasNext();) {
            String added = (String) props.next();
            result.put(added, properties.getSVNPropertyValue(added));
        }
View Full Code Here

            }
        }

        // calculate nodes for deselection by removing from currentlySelected nodes
        // those that must be selected.
        currentlySelected.removeAll(newSelectedNodes);

        setSelectState(currentlySelected, false);
        setSelectState(newSelectedNodes, true);
    }
View Full Code Here

            }
            //Split the recipients into two pools.  notRecipients will contain the
            //  recipients on the message that the matcher did not return.
            Collection notRecipients = new Vector();
            notRecipients.addAll(mail.getRecipients());
            notRecipients.removeAll(recipients);

            if (recipients.size() == 0) {
                //Everything was not a match... store it in the next spot in the array
                unprocessed[i + 1].add(mail);
                continue;
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.