use of org.eclipse.collections.api.collection.ImmutableCollection in project eclipse-collections by eclipse.
the class AbstractImmutableCollectionTestCase method collectLong.
@Test
public void collectLong() {
ImmutableCollection<Integer> integers = this.classUnderTest();
ImmutableLongCollection immutableCollection = integers.collectLong(PrimitiveFunctions.unboxIntegerToLong());
Verify.assertSize(integers.size(), immutableCollection);
Assert.assertEquals(integers, immutableCollection.collect(longParameter -> Integer.valueOf((int) longParameter)));
}
use of org.eclipse.collections.api.collection.ImmutableCollection in project eclipse-collections by eclipse.
the class AbstractImmutableCollectionTestCase method collectFloat.
@Test
public void collectFloat() {
ImmutableCollection<Integer> integers = this.classUnderTest();
ImmutableFloatCollection immutableCollection = integers.collectFloat(PrimitiveFunctions.unboxIntegerToFloat());
Verify.assertSize(integers.size(), immutableCollection);
Assert.assertEquals(integers, immutableCollection.collect(floatParameter -> Integer.valueOf((int) floatParameter)));
}
use of org.eclipse.collections.api.collection.ImmutableCollection in project eclipse-collections by eclipse.
the class AbstractImmutableCollectionTestCase method collectDouble.
@Test
public void collectDouble() {
ImmutableCollection<Integer> integers = this.classUnderTest();
ImmutableDoubleCollection immutableCollection = integers.collectDouble(PrimitiveFunctions.unboxIntegerToDouble());
Verify.assertSize(integers.size(), immutableCollection);
Assert.assertEquals(integers, immutableCollection.collect(doubleParameter -> Integer.valueOf((int) doubleParameter)));
}
Aggregations