Examples of retainAll()


Examples of java.util.Vector.retainAll()

    // Check non-empty vector.
    v.add(new Object());
    try
      {
        v.retainAll(null);
        h.fail("NPE should be thrown");
      }
    catch (NullPointerException ex)
      {
        h.check(true);
View Full Code Here

Examples of javolution.util.FastSet.retainAll()

        Set<BipartiteNode<T>> leftClone = new FastSet(U);
        Set<BipartiteNode<T>> rightClone = new FastSet(V);

        leftClone.removeAll(B1);
        rightClone.retainAll(B1);
        leftClone.addAll(rightClone);
        return leftClone;
    }

    public Set<Edge<BipartiteNode<T>>> calculateMaxmimumMatching() {
View Full Code Here

Examples of joust.utils.data.SymbolSet.retainAll()

        if (exprEffects.contains(EffectSet.EffectType.READ_INTERNAL)) {
            // Determine if this expression reads any symbols that are written in the loop.
            SymbolSet readSymbols = new SymbolSet(exprEffects.readInternal);

            log.debug("ReadSymbols: {}", readSymbols);
            readSymbols.retainAll(writtenInLoop);
            log.debug("After dropping: {}", readSymbols);

            if (!readSymbols.isEmpty()) {
                log.debug("No good - reads symbols written in the loop.");
                return;
View Full Code Here

Examples of kodkod.instance.TupleSet.retainAll()

        if (sol != that.sol) throw new ErrorAPI("A4TupleSet.intersect() requires 2 tuplesets from the same A4Solution.");
        if (arity() != that.arity()) throw new ErrorAPI("A4TupleSet.intersect() requires 2 tuplesets with the same arity.");
        if (this.tuples.size()==0) return this; // special short cut
        if (that.tuples.size()==0) return that; // special short cut
        TupleSet ts = tuples.clone();
        ts.retainAll(that.tuples);
        if (tuples.size()!=ts.size()) return new A4TupleSet(ts, sol); else return this;
    }

    /** Prints a human-readable description of this TupleSet. */
    @Override public String toString() {
View Full Code Here

Examples of kodkod.util.ints.IntSet.retainAll()

        if (lit > 0) posVars.add(lit);
        else negVars.add(-lit);
      }
    }
   
    posVars.retainAll(negVars);
   
    assert !posVars.isEmpty();
    final IntSet ret = new IntBitSet(posVars.max()+1);
    ret.addAll(posVars);
   
View Full Code Here

Examples of org.apache.commons.collections.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.commons.collections.primitives.ByteCollection.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((byte)1);
        assertEquals(1,proxied.getRemoveElementCount());
View Full Code Here

Examples of org.apache.commons.collections.primitives.CharCollection.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((char)1);
        assertEquals(1,proxied.getRemoveElementCount());
View Full Code Here

Examples of org.apache.commons.collections.primitives.DoubleCollection.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((double)1);
        assertEquals(1,proxied.getRemoveElementCount());
View Full Code Here

Examples of org.apache.commons.collections.primitives.FloatCollection.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((float)1);
        assertEquals(1,proxied.getRemoveElementCount());
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.