Package java.util

Examples of java.util.Set.retainAll()


        knownElementAdditions.addAll(localKnownElementAdditions);
        knownElementAdditions.removeAll(knownElements);

        Set knownElementRemovals = findPendingRemovals(parentElement,
            localKnownElementRemovals);
        knownElementRemovals.retainAll(knownElements);

        knownElements.addAll(knownElementAdditions);
        if (realizedElements != null) {
          realizedElements.removeAll(knownElementRemovals);
        }
View Full Code Here


  }

  public boolean retainAll(Collection c) {
    getterCalled();
    Set set = new HashSet(wrappedSet);
    boolean changed = set.retainAll(c);
    if (changed) {
      SetDiff diff = Diffs.computeSetDiff(wrappedSet, set);
      wrappedSet = set;
      updateTargetSet(diff);
      fireSetChange(diff);
View Full Code Here

        knownElementAdditions.addAll(localAdditions);
        knownElementAdditions.removeAll(knownElements);

        Set knownElementRemovals = findPendingRemovals(parentElement,
            localRemovals);
        knownElementRemovals.retainAll(knownElements);

        knownElements.addAll(knownElementAdditions);
        if (realizedElements != null) {
          realizedElements.removeAll(knownElementRemovals);
        }
View Full Code Here

    Set set = getSet();
    if (set.isEmpty())
      return false;

    Set removals = new HashSet(c);
    removals.retainAll(set);

    if (removals.isEmpty())
      return false;

    SetDiff diff = Diffs.createSetDiff(Collections.EMPTY_SET, removals);
View Full Code Here

        long start = System.currentTimeMillis();
        // Make sure we run at least once.
        while (System.currentTimeMillis() - start < timeout ||
                newStats == null) {
            newStats = new HashSet(Arrays.asList(getStats()));
            newStats.retainAll(oldStats);
            if (newStats.isEmpty()) {
                return;
            }
            Utilities.sleep(200);
        }
View Full Code Here

   *  Populate this bean with supplied property value pairs
   */ 
  private void populate(Map props2values) {
    Map safeProps = new HashMap(props2values);
    Set badProps = props2values.keySet();
    badProps.retainAll(illegalProperties);
    if (badProps.size() > 0) {
      // tsk tsk ... how could you do that
      Object[] badPropsArr = badProps.toArray();
      String badPropsStr = "";
      for (int i = 0; i < badPropsArr.length; i++) {
View Full Code Here

        if (nodeTypeNames != null) {
            Set eventTypes = new HashSet();
            eventTypes.addAll(Arrays.asList(event.getMixinTypeNames()));
            eventTypes.add(event.getPrimaryNodeTypeName());
            // create intersection
            eventTypes.retainAll(nodeTypeNames);
            if (eventTypes.isEmpty()) {
                return false;
            }
        }
View Full Code Here

        {
            logger.debug("checkCycles() - start");

            // Intersect the "tableDependsOn" and "otherTablesDependOn" to check for cycles
            Set intersect = new HashSet(this.allTableDependsOn);
            intersect.retainAll(this.allTableDependent);
            if(!intersect.isEmpty()){
                throw new CyclicTablesDependencyException(tableName, intersect);
            }
        }
View Full Code Here

    {
      if (((SplitInstantAction) a).parent.equals(((SplitInstantAction) b).parent)) return false;
    }
   
    Set addA = a.getAddPropositions();
    addA.retainAll(b.getConditionalPropositions());

    if (!addA.isEmpty()) return true;

    Set condA = a.getConditionalPropositions();
    condA.retainAll(b.getDeletePropositions());
View Full Code Here

    addA.retainAll(b.getConditionalPropositions());

    if (!addA.isEmpty()) return true;

    Set condA = a.getConditionalPropositions();
    condA.retainAll(b.getDeletePropositions());
    if (!condA.isEmpty()) return true;
   
    Set delA = a.getDeletePropositions();
    delA.retainAll(b.getAddPropositions());
    if (!delA.isEmpty()) return true;
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.