public static <T, P> Twin<MutableList<T>> selectAndRejectWith(
            Iterator<T> iterator,
            Predicate2<? super T, ? super P> predicate,
            P parameter)
    {
        MutableList<T> positiveResult = Lists.mutable.empty();
        MutableList<T> negativeResult = Lists.mutable.empty();
        while (iterator.hasNext())
        {
            T item = iterator.next();
            (predicate.accept(item, parameter) ? positiveResult : negativeResult).add(item);
        }
        return Tuples.twin(positiveResult, negativeResult);
    }
public static < T , P > Twin < MutableList < T > > selectAndRejectWith ( Iterator < T > iterator , Predicate2 < ? super T , ? super P > predicate , P parameter ) { MutableList < T > positiveResult = Lists . mutable . empty ( ) ; MutableList < T > negativeResult = Lists . mutable . empty ( ) ; while ( iterator . hasNext ( ) ) { T item = iterator . next ( ) ; ( predicate . accept ( item , parameter ) ? positiveResult : negativeResult ) . add ( item ) ; } return Tuples . twin ( positiveResult , negativeResult ) ; }
@see Iterate#selectAndRejectWith(Iterable, Predicate2, Object)