Package java.util

Examples of java.util.ArrayList.retainAll()


    if (dragged instanceof Listitem) {
      Set<Listitem> itemSet = new HashSet<Listitem>(getListbox()
          .getSelectedItems());
      itemSet.add((Listitem) dragged);
      List<Listitem> itemList = new ArrayList(getListbox().getItems());
      itemList.retainAll(itemSet);
      for (Listitem listitem : itemList) {
        if (listitem != target) {
          listitem.getParent().removeChild(listitem);
          target.getParent().insertBefore(listitem, target);
        }
View Full Code Here


    public boolean retainAll(Collection collection) {

        if (fast) {
            synchronized (this) {
                ArrayList temp = (ArrayList) list.clone();
                boolean result = temp.retainAll(collection);
                list = temp;
                return (result);
            }
        } else {
            synchronized (list) {
View Full Code Here

                        || cpc.getConfs().isEmpty() || cpc.getConfs().contains("*")) {
                    error = "A container already exists for the selected conf of "
                            + "the module descriptor";
                } else {
                    ArrayList list = new ArrayList(cpc.getConfs());
                    list.retainAll(selectedConfigurations);
                    if (!list.isEmpty()) {
                        error = "A container already exists for the selected conf of "
                                + "the module descriptor";
                    }
                }
View Full Code Here

    public boolean retainAll(Collection collection) {

        if (fast) {
            synchronized (this) {
                ArrayList temp = (ArrayList) list.clone();
                boolean result = temp.retainAll(collection);
                list = temp;
                return (result);
            }
        } else {
            synchronized (list) {
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

    public boolean retainAll(Collection collection) {

        if (fast) {
            synchronized (this) {
                ArrayList temp = (ArrayList) list.clone();
                boolean result = temp.retainAll(collection);
                list = temp;
                return (result);
            }
        } else {
            synchronized (list) {
View Full Code Here

        return element;
    }

    public boolean removeAll(final Collection c) {
        final Collection removed = new ArrayList(c);
        removed.retainAll(delegate);
        return detachAllListeners(removed, delegate.removeAll(c));
    }

    public boolean retainAll(final Collection c) {
        final Collection removed = new ArrayList(this);
View Full Code Here

        return detachAllListeners(removed, delegate.removeAll(c));
    }

    public boolean retainAll(final Collection c) {
        final Collection removed = new ArrayList(this);
        removed.retainAll(c);
        return detachAllListeners(removed, delegate.retainAll(c));
    }

    public Object set(final int index, final Object element) {
        final Object removed = delegate.set(index, element);
View Full Code Here

    public boolean retainAll(Collection collection) {

        if (fast) {
            synchronized (this) {
                ArrayList temp = (ArrayList) list.clone();
                boolean result = temp.retainAll(collection);
                list = temp;
                return (result);
            }
        } else {
            synchronized (list) {
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.