Search in sources :

Example 1 with ImmutableBooleanSetFactory

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

the class BooleanSetsTest method immutables.

@Test
public void immutables() {
    ImmutableBooleanSetFactory setFactory = BooleanSets.immutable;
    Assert.assertEquals(new BooleanHashSet(), setFactory.with());
    Verify.assertInstanceOf(ImmutableBooleanSet.class, setFactory.with());
    Assert.assertEquals(BooleanHashSet.newSetWith(true), setFactory.with(true));
    Verify.assertInstanceOf(ImmutableBooleanSet.class, setFactory.with(true));
    Assert.assertEquals(BooleanHashSet.newSetWith(true, false), setFactory.with(true, false));
    Verify.assertInstanceOf(ImmutableBooleanSet.class, setFactory.with(true, false));
    Assert.assertEquals(BooleanHashSet.newSetWith(true, false, true), setFactory.with(true, false, true));
    Verify.assertInstanceOf(ImmutableBooleanSet.class, setFactory.with(true, false, true));
    Assert.assertEquals(BooleanHashSet.newSetWith(true, false, true, false), setFactory.with(true, false, true, false));
    Verify.assertInstanceOf(ImmutableBooleanSet.class, setFactory.with(true, false, true, false));
    Assert.assertEquals(BooleanHashSet.newSetWith(true, false, true, false, true), setFactory.with(true, false, true, false, true));
    Verify.assertInstanceOf(ImmutableBooleanSet.class, setFactory.with(true, false, true, false, true));
    Assert.assertEquals(BooleanHashSet.newSetWith(true, false, true, false, true, false), setFactory.with(true, false, true, false, true, false));
    Verify.assertInstanceOf(ImmutableBooleanSet.class, setFactory.with(true, false, true, false, true, false));
    Assert.assertEquals(BooleanHashSet.newSetWith(true, false, true, false, true, false, true), setFactory.with(true, false, true, false, true, false, true));
    Verify.assertInstanceOf(ImmutableBooleanSet.class, setFactory.with(true, false, true, false, true, false, true));
    Assert.assertEquals(BooleanHashSet.newSetWith(true, false, true, false, true, false, true, true), setFactory.with(true, false, true, false, true, false, true, true));
    Verify.assertInstanceOf(ImmutableBooleanSet.class, setFactory.with(true, false, true, false, true, false, true, true));
    Assert.assertEquals(BooleanHashSet.newSetWith(true, false, true, false, true, false, true, true, true), setFactory.with(true, false, true, false, true, false, true, true, true));
    Verify.assertInstanceOf(ImmutableBooleanSet.class, setFactory.with(true, false, true, false, true, false, true, true, true));
    Assert.assertEquals(BooleanHashSet.newSetWith(true, false, true, false, true, false, true, true, true, false), setFactory.with(true, false, true, false, true, false, true, true, true, false));
    Verify.assertInstanceOf(ImmutableBooleanSet.class, setFactory.with(true, false, true, false, true, false, true, true, true, false));
    Assert.assertEquals(BooleanHashSet.newSetWith(true, false, true), setFactory.withAll(BooleanHashSet.newSetWith(true, false, true)));
    Verify.assertInstanceOf(ImmutableBooleanSet.class, setFactory.withAll(BooleanHashSet.newSetWith(true, false, true)));
}
Also used : ImmutableBooleanSetFactory(org.eclipse.collections.api.factory.set.primitive.ImmutableBooleanSetFactory) BooleanHashSet(org.eclipse.collections.impl.set.mutable.primitive.BooleanHashSet) Test(org.junit.Test)

Aggregations

ImmutableBooleanSetFactory (org.eclipse.collections.api.factory.set.primitive.ImmutableBooleanSetFactory)1 BooleanHashSet (org.eclipse.collections.impl.set.mutable.primitive.BooleanHashSet)1 Test (org.junit.Test)1