@Override
public <R extends MutableBooleanCollection> R collectBoolean(final BooleanFunction<? super T> booleanFunction, final R target)
{
if (target instanceof MutableBooleanBag)
{
final MutableBooleanBag targetBag = (MutableBooleanBag) target;
this.forEachWithOccurrences(new ObjectIntProcedure<T>()
{
public void value(T each, int occurrences)
{
targetBag.addOccurrences(booleanFunction.booleanValueOf(each), occurrences);
}
});
}
else
{