Search in sources :

Example 11 with ImmutableBooleanSet

use of org.eclipse.collections.api.set.primitive.ImmutableBooleanSet in project eclipse-collections by eclipse.

the class BooleanSetsTest method newSetWith.

@Test
public void newSetWith() {
    ImmutableBooleanSet set = BooleanSets.immutable.with();
    Assert.assertEquals(set, BooleanSets.immutable.with(set.toArray()));
    Assert.assertEquals(set = set.newWith(true), BooleanSets.immutable.with(true));
    Assert.assertEquals(set = set.newWith(false), BooleanSets.immutable.with(true, false));
    Assert.assertEquals(set = set.newWith(true), BooleanSets.immutable.with(true, false, true));
    Assert.assertEquals(set = set.newWith(false), BooleanSets.immutable.with(true, false, true, false));
    Assert.assertEquals(set = set.newWith(true), BooleanSets.immutable.with(true, false, true, false, true));
    Assert.assertEquals(set = set.newWith(false), BooleanSets.immutable.with(true, false, true, false, true, false));
    Assert.assertEquals(set = set.newWith(true), BooleanSets.immutable.with(true, false, true, false, true, false, true));
    Assert.assertEquals(set = set.newWith(true), BooleanSets.immutable.with(true, false, true, false, true, false, true, true));
    Assert.assertEquals(set = set.newWith(true), BooleanSets.immutable.with(true, false, true, false, true, false, true, true, true));
    Assert.assertEquals(set = set.newWith(false), BooleanSets.immutable.with(true, false, true, false, true, false, true, true, true, false));
    Assert.assertEquals(set = set.newWith(true), BooleanSets.immutable.with(true, false, true, false, true, false, true, true, true, false, true));
    Assert.assertEquals(set = set.newWith(false), BooleanSets.immutable.with(true, false, true, false, true, false, true, true, true, false, true, false));
}
Also used : ImmutableBooleanSet(org.eclipse.collections.api.set.primitive.ImmutableBooleanSet) Test(org.junit.Test)

Aggregations

ImmutableBooleanSet (org.eclipse.collections.api.set.primitive.ImmutableBooleanSet)11 Test (org.junit.Test)6 BooleanIterator (org.eclipse.collections.api.iterator.BooleanIterator)5 ImmutableEmptyBooleanIterator (org.eclipse.collections.impl.iterator.ImmutableEmptyBooleanIterator)1 BooleanHashSet (org.eclipse.collections.impl.set.mutable.primitive.BooleanHashSet)1