use of org.eclipse.collections.impl.list.mutable.primitive.FloatArrayList in project eclipse-collections by eclipse.
the class AbstractImmutableList method collectFloat.
@Override
public ImmutableFloatList collectFloat(FloatFunction<? super T> floatFunction) {
FloatArrayList result = new FloatArrayList(this.size());
this.forEach(new CollectFloatProcedure<>(floatFunction, result));
return result.toImmutable();
}
use of org.eclipse.collections.impl.list.mutable.primitive.FloatArrayList in project eclipse-collections by eclipse.
the class ImmutableEmptySortedBagTest method collectFloat_target.
@Override
@Test
public void collectFloat_target() {
ImmutableSortedBag<Integer> bag = this.classUnderTest();
Assert.assertEquals(new FloatArrayList(), bag.collectFloat(PrimitiveFunctions.unboxIntegerToFloat(), new FloatArrayList()));
ImmutableSortedBag<Integer> bag2 = this.classUnderTest();
Assert.assertEquals(new FloatHashBag(), bag2.collectFloat(PrimitiveFunctions.unboxIntegerToFloat(), new FloatHashBag()));
}
use of org.eclipse.collections.impl.list.mutable.primitive.FloatArrayList in project eclipse-collections by eclipse.
the class OrderedMapAdapter method collectFloat.
@Override
public MutableFloatList collectFloat(FloatFunction<? super V> floatFunction) {
FloatArrayList result = new FloatArrayList(this.size());
this.forEach(new CollectFloatProcedure<>(floatFunction, result));
return result;
}
use of org.eclipse.collections.impl.list.mutable.primitive.FloatArrayList in project eclipse-collections by eclipse.
the class AbstractImmutableSortedMap method collectFloat.
@Override
public ImmutableFloatList collectFloat(FloatFunction<? super V> floatFunction) {
FloatArrayList result = new FloatArrayList(this.size());
this.forEach(new CollectFloatProcedure<>(floatFunction, result));
return result.toImmutable();
}
use of org.eclipse.collections.impl.list.mutable.primitive.FloatArrayList in project eclipse-collections by eclipse.
the class AbstractImmutableSortedSet method collectFloat.
@Override
public ImmutableFloatList collectFloat(FloatFunction<? super T> floatFunction) {
FloatArrayList result = new FloatArrayList(this.size());
this.forEach(new CollectFloatProcedure<>(floatFunction, result));
return result.toImmutable();
}
Aggregations