Search in sources :

Example 1 with ImmutableBooleanBagFactory

use of org.eclipse.collections.api.factory.bag.primitive.ImmutableBooleanBagFactory in project eclipse-collections by eclipse.

the class BooleanBagsTest method immutables.

@Test
public void immutables() {
    ImmutableBooleanBagFactory bagFactory = BooleanBags.immutable;
    Assert.assertEquals(new BooleanHashBag(), bagFactory.of());
    Verify.assertInstanceOf(ImmutableBooleanBag.class, bagFactory.of());
    Assert.assertEquals(BooleanHashBag.newBagWith(true), bagFactory.of(true));
    Verify.assertInstanceOf(ImmutableBooleanBag.class, bagFactory.of(true));
    Assert.assertEquals(BooleanHashBag.newBagWith(true, false), bagFactory.of(true, false));
    Verify.assertInstanceOf(ImmutableBooleanBag.class, bagFactory.of(true, false));
    Assert.assertEquals(BooleanHashBag.newBagWith(true, false, true), bagFactory.of(true, false, true));
    Verify.assertInstanceOf(ImmutableBooleanBag.class, bagFactory.of(true, false, true));
    Assert.assertEquals(BooleanHashBag.newBagWith(true, false, true, false), bagFactory.of(true, false, true, false));
    Verify.assertInstanceOf(ImmutableBooleanBag.class, bagFactory.of(true, false, true, false));
    Assert.assertEquals(BooleanHashBag.newBagWith(true, false, true, false, true), bagFactory.of(true, false, true, false, true));
    Verify.assertInstanceOf(ImmutableBooleanBag.class, bagFactory.of(true, false, true, false, true));
    Assert.assertEquals(BooleanHashBag.newBagWith(true, false, true, false, true, false), bagFactory.of(true, false, true, false, true, false));
    Verify.assertInstanceOf(ImmutableBooleanBag.class, bagFactory.of(true, false, true, false, true, false));
    Assert.assertEquals(BooleanHashBag.newBagWith(true, false, true, false, true, false, true), bagFactory.of(true, false, true, false, true, false, true));
    Verify.assertInstanceOf(ImmutableBooleanBag.class, bagFactory.of(true, false, true, false, true, false, true));
    Assert.assertEquals(BooleanHashBag.newBagWith(true, false, true, false, true, false, true, true), bagFactory.of(true, false, true, false, true, false, true, true));
    Verify.assertInstanceOf(ImmutableBooleanBag.class, bagFactory.of(true, false, true, false, true, false, true, true));
    Assert.assertEquals(BooleanHashBag.newBagWith(true, false, true, false, true, false, true, true, true), bagFactory.of(true, false, true, false, true, false, true, true, true));
    Verify.assertInstanceOf(ImmutableBooleanBag.class, bagFactory.of(true, false, true, false, true, false, true, true, true));
    Assert.assertEquals(BooleanHashBag.newBagWith(true, false, true, false, true, false, true, true, true, false), bagFactory.of(true, false, true, false, true, false, true, true, true, false));
    Verify.assertInstanceOf(ImmutableBooleanBag.class, bagFactory.of(true, false, true, false, true, false, true, true, true, false));
    Assert.assertEquals(BooleanHashBag.newBagWith(true, false, true), bagFactory.ofAll(BooleanHashBag.newBagWith(true, false, true)));
    Verify.assertInstanceOf(ImmutableBooleanBag.class, bagFactory.ofAll(BooleanHashBag.newBagWith(true, false, true)));
}
Also used : ImmutableBooleanBagFactory(org.eclipse.collections.api.factory.bag.primitive.ImmutableBooleanBagFactory) BooleanHashBag(org.eclipse.collections.impl.bag.mutable.primitive.BooleanHashBag) Test(org.junit.Test)

Aggregations

ImmutableBooleanBagFactory (org.eclipse.collections.api.factory.bag.primitive.ImmutableBooleanBagFactory)1 BooleanHashBag (org.eclipse.collections.impl.bag.mutable.primitive.BooleanHashBag)1 Test (org.junit.Test)1