return result.toImmutable();
}
public ImmutableFloatBag collectFloat(final FloatFunction<? super T> floatFunction)
{
final FloatHashBag result = new FloatHashBag(this.size());
this.forEachWithOccurrences(new ObjectIntProcedure<T>()
{
public void value(T each, int occurrences)
{
result.addOccurrences(floatFunction.floatValueOf(each), occurrences);
}
});
return result.toImmutable();
}