Examples of retainAll()


Examples of java.util.HashSet.retainAll()

        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

Examples of java.util.HashSet.retainAll()

    private static Method getCallbackMethod(Class cls) {
        // Look at only public methods defined by the Callback class
        Method[] pubMethods = cls.getDeclaredMethods();
        Method[] classMethods = cls.getMethods();
        Set pmethods = new HashSet(Arrays.asList(pubMethods));
        pmethods.retainAll(Arrays.asList(classMethods));

        // Remove Object methods disallowed as callback method names
        for (Iterator i=pmethods.iterator();i.hasNext();) {
            Method m = (Method)i.next();
            if (Callback.FORBIDDEN_NAMES.contains(m.getName())) {
View Full Code Here

Examples of java.util.HashSet.retainAll()

    private static Method getCallbackMethod(Class cls) {
        // Look at only public methods defined by the Callback class
        Method[] pubMethods = cls.getDeclaredMethods();
        Method[] classMethods = cls.getMethods();
        Set pmethods = new HashSet(Arrays.asList(pubMethods));
        pmethods.retainAll(Arrays.asList(classMethods));

        // Remove Object methods disallowed as callback method names
        for (Iterator i=pmethods.iterator();i.hasNext();) {
            Method m = (Method)i.next();
            if (Callback.FORBIDDEN_NAMES.contains(m.getName())) {
View Full Code Here

Examples of java.util.LinkedHashSet.retainAll()

            for (int j = 0; j < intersected.length; j++) {
                Collection arts = getArtifactsIncludingExtending(intersected[j]);
                if (intersectedArtifacts.isEmpty()) {
                    intersectedArtifacts.addAll(arts);
                } else {
                    intersectedArtifacts.retainAll(arts);
                }
            }
            if (artifacts != null) {
                intersectedArtifacts.addAll(artifacts);
            }
View Full Code Here

Examples of java.util.LinkedList.retainAll()

        Map taskIDPositions = new HashMap();
        for (Iterator i = nodes.iterator(); i.hasNext();) {
            List taskIDs = ((EVTask) i.next()).getTaskIDs();
            if (intersects(taskIDs, bestIDs)) {
                List l = new LinkedList(taskIDs);
                l.retainAll(bestIDs);
                int pos = 0;
                for (Iterator j = l.iterator(); j.hasNext();) {
                    String taskID = (String) j.next();
                    increment(taskIDPositions, taskID, pos++);
                }
View Full Code Here

Examples of java.util.List.retainAll()

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

Examples of java.util.List.retainAll()

            if(tileIndices != null && tileIndices.length > 0) {
                // Create a Set from the supplied indices.
                List tileIndexList = Arrays.asList(tileIndices);

                // Retain only indices which were actually in the request.
                tileIndexList.retainAll(reqIndexList);

                indices = (Point[])tileIndexList.toArray(new Point[0]);
            } else {
                indices = (Point[])reqIndexList.toArray(new Point[0]);
            }
View Full Code Here

Examples of java.util.List.retainAll()

            if(tileIndices != null && tileIndices.length > 0) {
                // Create a Set from the supplied indices.
                List tileIndexList = Arrays.asList(tileIndices);

                // Retain only indices which were actually in the request.
                tileIndexList.retainAll(reqIndexList);

                indices = (Point[])tileIndexList.toArray(new Point[0]);
            } else {
                indices = (Point[])reqIndexList.toArray(new Point[0]);
            }
View Full Code Here

Examples of java.util.List.retainAll()

        public boolean retainAll(Collection o) {
            if (fast) {
                synchronized (FastArrayList.this) {
                    ArrayList temp = (ArrayList) list.clone();
                    List sub = get(temp);
                    boolean r = sub.retainAll(o);
                    if (r) last = first + sub.size();
                    list = temp;
                    expected = temp;
                    return r;
                }
View Full Code Here

Examples of java.util.List.retainAll()

      }
      catch (UnsupportedOperationException good) {}
     
      try
      {
         fciTargets.retainAll(targets);
         fail("retainAll call did not fail");
      }
      catch (UnsupportedOperationException good) {}
     
      Iterator iter = fciTargets.iterator();
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.