Package gnu.trove.set

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


        Collection<Integer> test_collection = new HashSet<Integer>();
        for ( int i = 0; i < element_count; i++ ) {
            test_collection.add( keys[i] );
        }
        assertTrue( keyset.containsAll( test_collection ) ) ;

        test_collection.remove( Integer.valueOf( keys[5] ) );
        assertTrue( "should contain all. keyset: " + keyset + ", " + test_collection,
                keyset.containsAll( test_collection ) );
View Full Code Here


        }
        assertTrue( keyset.containsAll( test_collection ) ) ;

        test_collection.remove( Integer.valueOf( keys[5] ) );
        assertTrue( "should contain all. keyset: " + keyset + ", " + test_collection,
                keyset.containsAll( test_collection ) );

        test_collection.add( Integer.valueOf( 1138 ) );
        assertFalse( "should not contain all. keyset: " + keyset + ", " + test_collection,
                keyset.containsAll( test_collection ) );
    }
View Full Code Here

        assertTrue( "should contain all. keyset: " + keyset + ", " + test_collection,
                keyset.containsAll( test_collection ) );

        test_collection.add( Integer.valueOf( 1138 ) );
        assertFalse( "should not contain all. keyset: " + keyset + ", " + test_collection,
                keyset.containsAll( test_collection ) );
    }


    public void testKeySetContainsAllTCollection() {
        int element_count = 20;
View Full Code Here

        TIntCollection test_collection = new TIntHashSet();
        for ( int i = 0; i < element_count; i++ ) {
            test_collection.add( keys[i] );
        }
        assertTrue( keyset.containsAll( test_collection ) ) ;
        assertTrue( keyset.equals( keyset ) );

        test_collection.remove( Integer.valueOf( keys[5] ) );
        assertTrue( "should contain all. keyset: " + keyset + ", " + test_collection,
                keyset.containsAll( test_collection ) );
View Full Code Here

        assertTrue( keyset.containsAll( test_collection ) ) ;
        assertTrue( keyset.equals( keyset ) );

        test_collection.remove( Integer.valueOf( keys[5] ) );
        assertTrue( "should contain all. keyset: " + keyset + ", " + test_collection,
                keyset.containsAll( test_collection ) );

        test_collection.add( 1138 );
        assertFalse( "should not contain all. keyset: " + keyset + ", " + test_collection,
                keyset.containsAll( test_collection ) );
    }
View Full Code Here

        assertTrue( "should contain all. keyset: " + keyset + ", " + test_collection,
                keyset.containsAll( test_collection ) );

        test_collection.add( 1138 );
        assertFalse( "should not contain all. keyset: " + keyset + ", " + test_collection,
                keyset.containsAll( test_collection ) );
    }


    public void testKeySetContainsAllArray() {
        int element_count = 20;
View Full Code Here

            assertTrue( keyset.contains( keys[i] ) );
        }
        assertFalse( keyset.isEmpty() );

        assertTrue( "should contain all. keyset: " + keyset + ", " + Arrays.toString( keys ),
                keyset.containsAll( keys ) );

        int[] other_array = new int[ keys.length + 1 ];
        System.arraycopy( keys, 0, other_array, 0, keys.length );
        other_array[other_array.length - 1] = 1138;
        assertFalse( "should not contain all. keyset: " + keyset + ", " + Arrays.toString( other_array ),
View Full Code Here

        int[] other_array = new int[ keys.length + 1 ];
        System.arraycopy( keys, 0, other_array, 0, keys.length );
        other_array[other_array.length - 1] = 1138;
        assertFalse( "should not contain all. keyset: " + keyset + ", " + Arrays.toString( other_array ),
                keyset.containsAll( other_array ) );
    }


    public void testKeySetRetainAllCollection() {
        int element_count = 20;
View Full Code Here

                    other, keyset.retainAll( other ) );
        assertFalse( keyset.contains( keys[5] ) );
        assertFalse( map.containsKey( keys[5] ) );
        assertFalse( map.containsValue( vals[5] ) );
        assertTrue( "keyset: " + keyset + ", should contain all in other: " +
                    other, keyset.containsAll( other ) );
    }


    public void testKeySetRetainAllArray() {
        int element_count = 20;
View Full Code Here

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

        assertTrue("retainAll(Collection<?>) failed: " + set,
                set.retainAll(retain_list));
        // Contains just the expected elements
        assertFalse(set.toString(), set.containsAll(ints));
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.