Package java.util

Examples of java.util.Collection.removeAll()


    IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
    Object[] projects = root.getProjects();
    new WorkbenchViewerComparator().sort(null, projects);
    projects = new ClosedProjectFilter().filter(null, (Object) null, projects);
    Collection result = new ArrayList(Arrays.asList(projects));
    result.removeAll(fProjectListDialogField.getElements());
    return result;
  }

  @Override
  public void dialogFieldChanged(DialogField field) {
View Full Code Here


     * @param holds a collection of the holds to remove
     */
    public synchronized void removeStartHolds(ObjectName objectName, Collection holds) {
        Collection currentHolds = (Collection) startHoldsMap.get(objectName);
        if (currentHolds != null) {
            currentHolds.removeAll(holds);
        }
    }

    /**
     * Removes all of the holds owned by a component.
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

      // Figure out which groups to get rid of.  We start off
      // with the full set for which we are already listening,
      // and eliminate any that are in both the new set and the
      // current set.
      Collection toRemove = new HashSet(groups);
      toRemove.removeAll(newGrps);
      // Add new groups before we remove any old groups, because
      // removeGroups will start a new round of multicast requests
      // if the set of groups becomes empty, and we don't want it
      // to do so without reason.
      groups.addAll(toAdd);
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

            }
        }

        // 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

                    {
                        mdhRemovalSet.add(mdh);
                    }
                }
            }
            metaDataHitCol.removeAll(mdhRemovalSet);
        }

        // apply collection filtering
        if (iv_collectionFilterList.size() > 0)
        {
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.