public static <T, V, R extends Collection<V>> R collectIf(
            Iterable<T> iterable,
            Predicate<? super T> predicate,
            Function<? super T, ? extends V> function,
            R target)
    {
        if (iterable instanceof RichIterable)
        {
            return ((RichIterable<T>) iterable).collectIf(predicate, function, target);
        }
        if (iterable instanceof ArrayList)
        {
            return ArrayListIterate.collectIf((ArrayList<T>) iterable, predicate, function, target);
        }
        if (iterable instanceof List)
        {
            return ListIterate.collectIf((List<T>) iterable, predicate, function, target);
        }
        if (iterable != null)
        {
            return IterableIterate.collectIf(iterable, predicate, function, target);
        }
        throw new IllegalArgumentException("Cannot perform a collectIf on null");
    }
public static < T , V , R extends Collection < V > > R collectIf ( Iterable < T > iterable , Predicate < ? super T > predicate , Function < ? super T , ? extends V > function , R target ) { if ( iterable instanceof RichIterable ) { return ( ( RichIterable < T > ) iterable ) . collectIf ( predicate , function , target ) ; } if ( iterable instanceof ArrayList ) { return ArrayListIterate . collectIf ( ( ArrayList < T > ) iterable , predicate , function , target ) ; } if ( iterable instanceof List ) { return ListIterate . collectIf ( ( List < T > ) iterable , predicate , function , target ) ; } if ( iterable != null ) { return IterableIterate . collectIf ( iterable , predicate , function , target ) ; } throw new IllegalArgumentException ( "Cannot perform a collectIf on null" ) ; }
@see RichIterable#collectIf(Predicate, Function, Collection)