return result.toImmutable();
}
public ImmutableIntBag collectInt(final IntFunction<? super T> intFunction)
{
final IntHashBag result = new IntHashBag(this.size());
this.forEachWithOccurrences(new ObjectIntProcedure<T>()
{
public void value(T each, int occurrences)
{
result.addOccurrences(intFunction.intValueOf(each), occurrences);
}
});
return result.toImmutable();
}