Package java.util

Examples of java.util.Set.retainAll()


    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;

    return false;
  }
View Full Code Here


    }

        public boolean check()
        {
      Set testSet = new HashSet(followsStart);
      testSet.retainAll(precedesEnd);
      if (testSet.isEmpty()) return true;
      else return stnCheck();
    }

        public boolean stnCheck()
View Full Code Here

  }

  public static void getCOrderings(Action a, TotalOrderPlan top, PartialOrderPlan pop, Set goals)
    {
    Set as = a.getAddPropositions();
    as.retainAll(goals);
    Iterator adit = as.iterator();
    while (adit.hasNext())
    {
      Proposition ad = (Proposition) adit.next();
      ListIterator bit = top.listIterator(a);
View Full Code Here

      {
         lock.readLock().acquire();
         try
         {
            Set state = getCurrentState(true);
            return state.retainAll(c);
         }
         finally
         {
            lock.readLock().release();
         }
View Full Code Here

    CPStringBuilder sb = new CPStringBuilder("");

    // Get the valid attribute list
    Set allAttribs = aci.getAllAttributeKeys();
    if (attributes != null)
      allAttribs.retainAll(Arrays.asList(attributes));

    // Loop through and extract the attributes
    char c = aci.setIndex(begin);

    ArrayList accum = new ArrayList();
View Full Code Here

    for (int i = 0; i < nNodes; i++) {
      int iNode = order[i];
      if (cliques[iNode] != null) {
        Set separator = new HashSet();
        separator.addAll(cliques[iNode]);
        separator.retainAll(processedNodes);
        separators[iNode] = separator;
        processedNodes.addAll(cliques[iNode]);
      }
    }
    return separators;
View Full Code Here

        for (int i = 0; i < actions.size(); i++) {
            MultiIndex.Action a = (MultiIndex.Action) actions.get(i);
            if (a.getType() == MultiIndex.Action.TYPE_COMMIT) {
                transactionIds.clear();
            } else if (a.getType() == MultiIndex.Action.TYPE_VOLATILE_COMMIT) {
                transactionIds.retainAll(losers);
                // check if transactionIds contains losers
                if (transactionIds.size() > 0) {
                    // found dirty volatile commit
                    break;
                } else {
View Full Code Here

     * The list is compared against the accepted list provided in the
     * constructor.
     */
    protected boolean isSupported(DataFlavor[] flavors) {
        Set set = new HashSet(Arrays.asList(flavors));
        set.retainAll(acceptedFlavors);
        return !set.isEmpty();
    }

    /** Update the appearance of the target component.  Normally the decoration
     * should be painted only if the event is an instance of
View Full Code Here

      } else {
        if (right.couldMatchKinds().size() > 0)
          validateSingleBranch(right, userPointcut, numFormals, names, rightBindings);       
      }
    Set kindsInCommon = left.couldMatchKinds();
    kindsInCommon.retainAll(right.couldMatchKinds());
    if (!kindsInCommon.isEmpty() && couldEverMatchSameJoinPoints(left,right)) {
      // we know that every branch binds every formal, so there is no ambiguity
      // if each branch binds it in exactly the same way...
      List ambiguousNames = new ArrayList();
      for (int i = 0; i < numFormals; i++) {
View Full Code Here

/*     */     {
/* 467 */       this.lock.readLock().acquire();
/*     */       try
/*     */       {
/* 470 */         Set state = getCurrentState(true);
/* 471 */         boolean bool = state.retainAll(c);
/*     */         return bool; } finally { this.lock.readLock().release(); }
/*     */     }
/*     */     catch (Exception ex)
/*     */     {
/*     */     }
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.