Package java.util

Examples of java.util.Collection.retainAll()


      {
         //start FLUSH only on group members that we need to flush
         if (view != null)
         {
            participantsInFlush = new ArrayList(view.getMembers());
            participantsInFlush.retainAll(currentView.getMembers());
         }
         else
         {
            participantsInFlush = new ArrayList(currentView.getMembers());
         }
View Full Code Here


        }

        boolean added_b = b.add("element1");
        try {
            assertTrue(!a.retainAll(b));
            assertTrue(added_b == b.retainAll(a));
            assertTrue(b.isEmpty());
        } catch(UnsupportedOperationException e) {
            // expected
        } catch(Throwable t) {
            t.printStackTrace();
View Full Code Here

        boolean added_b1 = b.add("element1");
        boolean added_b2 = b.add("element2");
        boolean added_a1 = a.add("element1");
        if(added_b1 && added_b2 && added_a1) {
            try {
                assertTrue(!b.retainAll(b));
                assertTrue(b.contains("element1"));
                assertTrue(b.contains("element2"));

                assertTrue(!a.retainAll(b));
View Full Code Here

                assertTrue(b.contains("element1"));
                assertTrue(b.contains("element2"));

                assertTrue(!a.retainAll(b));

                assertTrue(b.retainAll(a));
                assertTrue(b.contains("element1"));
                assertTrue(!b.contains("element2"));
            } catch(UnsupportedOperationException e) {
                // expected
            } catch(Throwable t) {
View Full Code Here

            result.put(added, properties.getSVNPropertyValue(added));
        }

        // changed in props2
        tmp = new TreeSet(props2);
        tmp.retainAll(props1);
       
        for (Iterator props = tmp.iterator(); props.hasNext();) {
            String changed = (String) props.next();
            SVNPropertyValue value1 = getSVNPropertyValue(changed);
            SVNPropertyValue value2 = properties.getSVNPropertyValue(changed);
View Full Code Here

        }

        boolean added_b = b.add("element1");
        try {
            assertTrue(!a.retainAll(b));
            assertTrue(added_b == b.retainAll(a));
            assertTrue(b.isEmpty());
        } catch(UnsupportedOperationException e) {
            // expected
        } catch(Throwable t) {
            t.printStackTrace();
View Full Code Here

        boolean added_b1 = b.add("element1");
        boolean added_b2 = b.add("element2");
        boolean added_a1 = a.add("element1");
        if(added_b1 && added_b2 && added_a1) {
            try {
                assertTrue(!b.retainAll(b));
                assertTrue(b.contains("element1"));
                assertTrue(b.contains("element2"));

                assertTrue(!a.retainAll(b));
View Full Code Here

                assertTrue(b.contains("element1"));
                assertTrue(b.contains("element2"));

                assertTrue(!a.retainAll(b));

                assertTrue(b.retainAll(a));
                assertTrue(b.contains("element1"));
                assertTrue(!b.contains("element2"));
            } catch(UnsupportedOperationException e) {
                // expected
            } catch(Throwable t) {
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

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.