Search in sources :

Example 1 with ImmutableFloatBag

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

the class ImmutableBagTestCase method collectFloat.

@Override
@Test
public void collectFloat() {
    super.collectFloat();
    ImmutableFloatBag result = this.newBag().collectFloat(Float::parseFloat);
    Assert.assertEquals(this.numKeys(), result.sizeDistinct());
    for (int i = 1; i <= this.numKeys(); i++) {
        Assert.assertEquals(i, result.occurrencesOf(i));
    }
}
Also used : ImmutableFloatBag(org.eclipse.collections.api.bag.primitive.ImmutableFloatBag) Test(org.junit.Test)

Aggregations

ImmutableFloatBag (org.eclipse.collections.api.bag.primitive.ImmutableFloatBag)1 Test (org.junit.Test)1