Package com.hazelcast.core

Examples of com.hazelcast.core.ISet.retainAll()


        Set retained = new HashSet();

        for (int i = 1; i <= 10; i++) {
            set.add("item" + i);
        }
        set.retainAll(retained);
        assertEquals(0, set.size());
    }

    @Test
    public void testRetainAll_whenArgumentHasSameElements() {
View Full Code Here


        for (int i = 1; i <= 10; i++) {
            set.add("item" + i);
            retained.add("item" + i);
        }
        set.retainAll(retained);
        assertEquals(10, set.size());
    }

    @Test(expected = NullPointerException.class)
    public void testRetainAll_whenCollectionNull() {
View Full Code Here

    @Test(expected = NullPointerException.class)
    public void testRetainAll_whenCollectionNull() {
        ISet set = newSet();
        Set retained = null;
        set.retainAll(retained);
        assertEquals(0, set.size());
    }

    //    ======================== contains - containsAll ==========================
    @Test
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.