Package java.util

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


            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

            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

        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

      }
      catch (UnsupportedOperationException good) {}
     
      try
      {
         fciTargets.retainAll(targets);
         fail("retainAll call did not fail");
      }
      catch (UnsupportedOperationException good) {}
     
      Iterator iter = fciTargets.iterator();
View Full Code Here

        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

        List filter = getProcessListPlain("Phase_Display_Filter_List");
        if (filter.isEmpty())
            return phases;
       
        List result = new ArrayList(phases);
        result.retainAll(filter);
        return result;
    }

    public String getProcessString(String stringName) {
        return getProcessString(stringName, true);
View Full Code Here

        return result;
    }

    private static void merge(List a, List b) {
        List shared = new ArrayList(b);
        shared.retainAll(a);

        for (Iterator i = shared.iterator(); i.hasNext();) {
            Object element = i.next();
            int aPos = a.indexOf(element);
            int bPos = b.indexOf(element);
View Full Code Here

                getLeftResultSet().getAllResultColumns(null);
        ResultColumnList rightRCL =
                getRightResultSet().getAllResultColumns(null);

        List columnNames = extractColumnNames(leftRCL);
        columnNames.retainAll(extractColumnNames(rightRCL));

        ResultColumnList commonColumns =
                (ResultColumnList) getNodeFactory().getNode(
                        C_NodeTypes.RESULT_COLUMN_LIST,
                        getContextManager());
View Full Code Here

        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

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.