@Override
public <R extends MutableLongCollection> R collectLong(final LongFunction<? super T> longFunction, final R target)
{
if (target instanceof MutableLongBag)
{
final MutableLongBag targetBag = (MutableLongBag) target;
this.forEachWithOccurrences(new ObjectIntProcedure<T>()
{
public void value(T each, int occurrences)
{
targetBag.addOccurrences(longFunction.longValueOf(each), occurrences);
}
});
}
else
{