Search in sources :

Example 1 with MutableFloatSet

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

the class AbstractImmutableSet method collectFloat.

@Override
public ImmutableFloatSet collectFloat(FloatFunction<? super T> floatFunction) {
    MutableFloatSet result = new FloatHashSet(this.size());
    this.forEach(new CollectFloatProcedure<>(floatFunction, result));
    return result.toImmutable();
}
Also used : MutableFloatSet(org.eclipse.collections.api.set.primitive.MutableFloatSet) FloatHashSet(org.eclipse.collections.impl.set.mutable.primitive.FloatHashSet)

Example 2 with MutableFloatSet

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

the class AbstractMutableSet method collectFloat.

@Override
public MutableFloatSet collectFloat(FloatFunction<? super T> floatFunction) {
    MutableFloatSet result = new FloatHashSet(this.size());
    this.forEach(new CollectFloatProcedure<>(floatFunction, result));
    return result;
}
Also used : MutableFloatSet(org.eclipse.collections.api.set.primitive.MutableFloatSet) FloatHashSet(org.eclipse.collections.impl.set.mutable.primitive.FloatHashSet)

Aggregations

MutableFloatSet (org.eclipse.collections.api.set.primitive.MutableFloatSet)2 FloatHashSet (org.eclipse.collections.impl.set.mutable.primitive.FloatHashSet)2