public static <T, P, R extends Collection<T>> R selectWith(
            Iterable<T> iterable,
            Predicate2<? super T, ? super P> predicate,
            P parameter,
            R targetCollection)
    {
        if (iterable instanceof RichIterable)
        {
            return ((RichIterable<T>) iterable).selectWith(predicate, parameter, targetCollection);
        }
        if (iterable instanceof ArrayList)
        {
            return ArrayListIterate.selectWith((ArrayList<T>) iterable, predicate, parameter, targetCollection);
        }
        if (iterable instanceof List)
        {
            return ListIterate.selectWith((List<T>) iterable, predicate, parameter, targetCollection);
        }
        if (iterable != null)
        {
            return IterableIterate.selectWith(iterable, predicate, parameter, targetCollection);
        }
        throw new IllegalArgumentException("Cannot perform a selectWith on null");
    }
public static < T , P , R extends Collection < T > > R selectWith ( Iterable < T > iterable , Predicate2 < ? super T , ? super P > predicate , P parameter , R targetCollection ) { if ( iterable instanceof RichIterable ) { return ( ( RichIterable < T > ) iterable ) . selectWith ( predicate , parameter , targetCollection ) ; } if ( iterable instanceof ArrayList ) { return ArrayListIterate . selectWith ( ( ArrayList < T > ) iterable , predicate , parameter , targetCollection ) ; } if ( iterable instanceof List ) { return ListIterate . selectWith ( ( List < T > ) iterable , predicate , parameter , targetCollection ) ; } if ( iterable != null ) { return IterableIterate . selectWith ( iterable , predicate , parameter , targetCollection ) ; } throw new IllegalArgumentException ( "Cannot perform a selectWith on null" ) ; }
Same as the selectWith method with two parameters but uses the specified target collection.