Package gnu.trove.set

Examples of gnu.trove.set.TIntSet.containsAll()


        assertTrue("retainAll(Collection<?>) failed: " + set,
                set.retainAll(retain_list));
        // Contains just the expected elements
        assertFalse(set.toString(), set.containsAll(ints));
        assertTrue(set.toString(), set.containsAll(to_retain));
        assertTrue(retain_set.toString(), retain_set.containsAll(to_retain));

        // reset the set.
        set = new TIntHashSet();
        set.addAll(ints);
        assertTrue("retainAll(TIntSet) failed: " + set,
View Full Code Here


        assertTrue("retainAll(TIntSet) failed: " + set,
                set.retainAll(retain_set));
        // Contains just the expected elements
        assertFalse(set.toString(), set.containsAll(ints));
        assertTrue(set.toString(), set.containsAll(to_retain));
        assertTrue(retain_set.toString(), retain_set.containsAll(to_retain));

        // reset the set.
        set = new TIntHashSet();
        set.addAll(ints);
        assertTrue("retainAll(int[]) failed: " + set,
View Full Code Here

        assertTrue("retainAll(int[]) failed: " + set,
                set.retainAll(to_retain));
        // Contains just the expected elements
        assertFalse(set.toString(), set.containsAll(ints));
        assertTrue(set.toString(), set.containsAll(to_retain));
        assertTrue(retain_set.toString(), retain_set.containsAll(to_retain));
    }


    public void testRemoveAll() throws Exception {
View Full Code Here

        assertTrue("removeAll(Collection<?>) failed: " + set,
                set.removeAll(remove_list));
        // Contains just the expected elements
        assertTrue(set.toString(), set.containsAll(remainder));
        assertFalse(set.toString(), set.containsAll(to_remove));
        assertTrue(remove_set.toString(), remove_set.containsAll(to_remove));

        // reset the set.
        set = new TIntHashSet();
        set.addAll(ints);
        assertTrue("removeAll(TIntSet) failed: " + set,
View Full Code Here

        assertTrue("removeAll(TIntSet) failed: " + set,
                set.removeAll(remove_set));
        // Contains just the expected elements
        assertTrue(set.toString(), set.containsAll(remainder));
        assertFalse(set.toString(), set.containsAll(to_remove));
        assertTrue(remove_set.toString(), remove_set.containsAll(to_remove));

        // reset the set.
        set = new TIntHashSet();
        set.addAll(ints);
        assertTrue("removeAll(int[]) failed: " + set,
View Full Code Here

        assertTrue("removeAll(int[]) failed: " + set,
                set.removeAll(to_remove));
        // Contains just the expected elements
        assertTrue(set.toString(), set.containsAll(remainder));
        assertFalse(set.toString(), set.containsAll(to_remove));
        assertTrue(remove_set.toString(), remove_set.containsAll(to_remove));
    }


    public void testAdd() throws Exception {
        TIntSet set = new TIntHashSet();
View Full Code Here

        // test with a java.util.Map
        Set<Number> java_set = new HashSet<Number>();
        for ( int i = 0; i < keys.length; i++ ) {
            java_set.add( Integer.valueOf( keys[i] ) );
        }
        assertTrue( set.containsAll( java_set ) );
        java_set.add( Integer.valueOf( 12 ) );
        assertFalse( set.containsAll( java_set ) );
        java_set.remove( Integer.valueOf( 12 ) );
        assertTrue( set.containsAll( java_set ) );
        java_set.add( Long.valueOf( 12 ) );
View Full Code Here

        for ( int i = 0; i < keys.length; i++ ) {
            java_set.add( Integer.valueOf( keys[i] ) );
        }
        assertTrue( set.containsAll( java_set ) );
        java_set.add( Integer.valueOf( 12 ) );
        assertFalse( set.containsAll( java_set ) );
        java_set.remove( Integer.valueOf( 12 ) );
        assertTrue( set.containsAll( java_set ) );
        java_set.add( Long.valueOf( 12 ) );
        assertFalse( set.containsAll( java_set ) );
View Full Code Here

        }
        assertTrue( set.containsAll( java_set ) );
        java_set.add( Integer.valueOf( 12 ) );
        assertFalse( set.containsAll( java_set ) );
        java_set.remove( Integer.valueOf( 12 ) );
        assertTrue( set.containsAll( java_set ) );
        java_set.add( Long.valueOf( 12 ) );
        assertFalse( set.containsAll( java_set ) );

        // test with a TCollection
        TIntSet tintset = new TIntHashSet( keys );
View Full Code Here

        java_set.add( Integer.valueOf( 12 ) );
        assertFalse( set.containsAll( java_set ) );
        java_set.remove( Integer.valueOf( 12 ) );
        assertTrue( set.containsAll( java_set ) );
        java_set.add( Long.valueOf( 12 ) );
        assertFalse( set.containsAll( java_set ) );

        // test with a TCollection
        TIntSet tintset = new TIntHashSet( keys );
        assertTrue( set.containsAll( tintset ) );
        tintset.add( 12 );
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.