Examples of retainAll()


Examples of org.apache.commons.collections.primitives.IntCollection.retainAll()

        assertEquals(0,proxied.getRemoveAllCount());
        collection.removeAll(null);
        assertEquals(1,proxied.getRemoveAllCount());

        assertEquals(0,proxied.getRetainAllCount());
        collection.retainAll(null);
        assertEquals(1,proxied.getRetainAllCount());

        assertEquals(0,proxied.getRemoveElementCount());
        collection.removeElement(1);
        assertEquals(1,proxied.getRemoveElementCount());
View Full Code Here

Examples of org.apache.commons.collections.primitives.LongCollection.retainAll()

        assertEquals(0,proxied.getRemoveAllCount());
        collection.removeAll(null);
        assertEquals(1,proxied.getRemoveAllCount());

        assertEquals(0,proxied.getRetainAllCount());
        collection.retainAll(null);
        assertEquals(1,proxied.getRetainAllCount());

        assertEquals(0,proxied.getRemoveElementCount());
        collection.removeElement(1);
        assertEquals(1,proxied.getRemoveElementCount());
View Full Code Here

Examples of org.apache.commons.collections.primitives.ShortCollection.retainAll()

        assertEquals(0,proxied.getRemoveAllCount());
        collection.removeAll(null);
        assertEquals(1,proxied.getRemoveAllCount());

        assertEquals(0,proxied.getRetainAllCount());
        collection.retainAll(null);
        assertEquals(1,proxied.getRetainAllCount());

        assertEquals(0,proxied.getRemoveElementCount());
        collection.removeElement((short)1);
        assertEquals(1,proxied.getRemoveElementCount());
View Full Code Here

Examples of org.apache.commons.collections15.Bag.retainAll()

        bag.add("B");
        bag.add("C");
        List retains = new ArrayList();
        retains.add("B");
        retains.add("C");
        bag.retainAll(retains);
        assertEquals("Should have 2 total items", 2, bag.size());
    }

    public void testIterator() {
        Bag bag = makeBag();
View Full Code Here

Examples of org.apache.mahout.cf.taste.impl.common.FastIDSet.retainAll()

    while (!intersection.isEmpty() && (i < itemIDs.length)) {
      userIDs = preferenceForItems.get(itemIDs[i]);
      if (userIDs == null) {
        throw new NoSuchItemException();
      }
      intersection.retainAll(userIDs);
      i++;
    }
    return intersection.size();
  }
 
View Full Code Here

Examples of org.hibernate.collection.PersistentBag.retainAll()

    assertFalse( children.remove( otherChild ) );
    assertFalse( children.isDirty() );

    ArrayList otherCollection = new ArrayList();
    otherCollection.add( child );
    assertFalse( children.retainAll( otherCollection ) );
    assertFalse( children.isDirty() );

    otherCollection = new ArrayList();
    otherCollection.add( otherChild );
    assertFalse( children.removeAll( otherCollection ) );
View Full Code Here

Examples of org.hibernate.collection.PersistentIdentifierBag.retainAll()

    assertFalse( children.remove( otherChild ) );
    assertFalse( children.isDirty() );

    ArrayList otherCollection = new ArrayList();
    otherCollection.add( child );
    assertFalse( children.retainAll( otherCollection ) );
    assertFalse( children.isDirty() );

    otherCollection = new ArrayList();
    otherCollection.add( otherChild );
    assertFalse( children.removeAll( otherCollection ) );
View Full Code Here

Examples of org.hibernate.collection.PersistentList.retainAll()

    assertFalse( children.remove( otherChild ) );
    assertFalse( children.isDirty() );

    ArrayList otherCollection = new ArrayList();
    otherCollection.add( child );
    assertFalse( children.retainAll( otherCollection ) );
    assertFalse( children.isDirty() );

    otherCollection = new ArrayList();
    otherCollection.add( otherChild );
    assertFalse( children.removeAll( otherCollection ) );
View Full Code Here

Examples of org.hibernate.collection.PersistentSet.retainAll()

    HashSet otherSet = new HashSet();
    otherSet.add( child );
    assertFalse( children.addAll( otherSet ) );
    assertFalse( children.isDirty() );

    assertFalse( children.retainAll( otherSet ) );
    assertFalse( children.isDirty() );

    otherSet = new HashSet();
    otherSet.add( otherChild );
    assertFalse( children.removeAll( otherSet ) );
View Full Code Here

Examples of org.jboss.util.collection.SoftSet.retainAll()

      assertTrue("Key#1000 was added", set.addAll(set2));
      assertEquals("Size == 1001", 1001, set.size());
      assertTrue("Key#1000 was removed", set.removeAll(set2));
      assertEquals("Size == 1000", 1000, set.size());
      set.add("Key#1000");
      assertTrue("Key#1000 was removed", set.retainAll(set2));
      assertEquals("Size == 1", 1, set.size());
      assertTrue("set contains [Key#1000]", set.containsAll(set2));
     
      set.clear();
      assertEquals("Size == 0", 0, set.size());
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.