return result.toImmutable();
}
public ImmutableCharBag collectChar(final CharFunction<? super T> charFunction)
{
final CharHashBag result = new CharHashBag(this.size());
this.forEachWithOccurrences(new ObjectIntProcedure<T>()
{
public void value(T each, int occurrences)
{
result.addOccurrences(charFunction.charValueOf(each), occurrences);
}
});
return result.toImmutable();
}