Examples of containsAll()


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

Examples of it.unimi.dsi.fastutil.longs.LongSortedSet.containsAll()

    @Override
    public void score(long user, @Nonnull MutableSparseVector scores){
        LongSortedSet reqItems = scores.keyDomain();
        if(cachedId == user && cachedScores != null) {
            LongSortedSet cachedItems = cachedScores.keyDomain();
            if(!cachedItems.containsAll(reqItems)) {
                LongSortedSet diffItems = LongUtils.setDifference(reqItems, cachedItems);
                SparseVector newCache = scorer.score(user, diffItems);
                cachedScores = cachedScores.combineWith(newCache);
            }
            scores.set(cachedScores);
View Full Code Here

Examples of java.util.ArrayList.containsAll()

        FactHandle fhC = ksession.insert(lC);

        ksession.fireAllRules(); // C gets blocked by B

        assertEquals(2, list.size());
        assertTrue(list.containsAll(asList("A", "B")));
        list.clear();

        ksession.update(fhB, lB.setDay(0).setIndex(4));
        ksession.update(fhC, lC.setDay(0).setIndex(3));
        ksession.fireAllRules(); // B is still a valid blocker for C
View Full Code Here

Examples of java.util.ArrayList.containsAll()

            }

        }

        ArrayList<String> keysForNode = expectedNodeIdToKeys.get(nodeIdToVerifyOn);
        if(!fetchedKeysForNode.containsAll(keysForNode))
            return false;
        else
            return true;
    }
}
View Full Code Here

Examples of java.util.ArrayList.containsAll()

        allOptions.add(bothB);
       
        Collection helpOptions = options.helpOptions();
       
        assertTrue("Everything in all should be in help",helpOptions.containsAll(allOptions));
        assertTrue("Everything in help should be in all",allOptions.containsAll(helpOptions));       
    }

    public void testMissingOptionException() throws ParseException {
        Options options = new Options();
        options.addOption(OptionBuilder.isRequired().create("f"));
View Full Code Here

Examples of java.util.ArrayList.containsAll()

                    TextBox tbox = (TextBox)sh[i];
                    lst2.add(tbox.getText());
                }
            }
            assertTrue(lst1.containsAll(lst2));
            assertTrue(lst2.containsAll(lst1));
        }
    }
}
View Full Code Here

Examples of java.util.ArrayList.containsAll()

        FactHandle fhC = ksession.insert(lC);

        ksession.fireAllRules(); // C gets blocked by B

        assertEquals(2, list.size());
        assertTrue(list.containsAll(asList("A", "B")));
        list.clear();

        ksession.update(fhB, lB.setDay(0).setIndex(4));
        ksession.update(fhC, lC.setDay(0).setIndex(3));
        ksession.fireAllRules(); // B is still a valid blocker for C
View Full Code Here

Examples of java.util.ArrayList.containsAll()

        ksession.fireAllRules();
        ksession.dispose();

        assertEquals( 2,
                      list.size() );
        assertTrue( list.containsAll( Arrays.asList( new String[]{"rule1", "rule2"} ) ) );
    }

    @Test
    public void testBasicAuthentication() throws SAXException,
                               IOException {
View Full Code Here

Examples of java.util.ArrayList.containsAll()

        while (list1.size() > 0)
            list1.remove(0);
        list1.addAll(list2);
        assertTrue("The object list is not the same as original list", list1
                .containsAll(list2)
                && list2.containsAll(list1));

        obj = new ArrayList();
        for (int i = 0; i < 100; i++) {
            if (list1.size() > 0) {
                obj.removeAll(list1);
View Full Code Here

Examples of java.util.ArrayList.containsAll()

        assertEquals("values should be empty if HashMap is" +
                     "\nTest: " + test + "\nReal: " + known,
                     empty, values.isEmpty());
        assertTrue("values should contain all HashMap's elements" +
                   "\nTest: " + test + "\nReal: " + known,
                    test.containsAll(known));
        assertTrue("values should contain all HashMap's elements" +
                   "\nTest: " + test + "\nReal: " + known,
                   known.containsAll(test));
        // originally coded to use a HashBag, but now separate jar so...
        for (Iterator it = known.iterator(); it.hasNext();) {
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.