@Override public <V> MutableList<V> collectIf(Predicate<? super T> predicate, Function<? super T, ? extends V> function) { return ListIterate.collectIf(this.getDelegate(), predicate, function); }
/** * @see Iterate#collectIf(Iterable, Predicate, Function) */ public static <T, A> MutableList<A> collectIf( List<T> list, Predicate<? super T> predicate, Function<? super T, ? extends A> function) { return ListIterate.collectIf(list, predicate, function, FastList.<A>newList()); }
@Override public <V, R extends Collection<V>> R collectIf( Predicate<? super T> predicate, Function<? super T, ? extends V> function, R target) { return ListIterate.collectIf(this, predicate, function, target); }
/** * @see RichIterable#collectIf(Predicate, Function, Collection) */ 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"); }
return ListIterate.collectIf((List<T>) iterable, predicate, function);
@Override public <V> MutableList<V> collectIf(Predicate<? super T> predicate, Function<? super T, ? extends V> function) { return ListIterate.collectIf(this.getDelegate(), predicate, function); }
/** * @see Iterate#collectIf(Iterable, Predicate, Function) */ public static <T, A> MutableList<A> collectIf( List<T> list, Predicate<? super T> predicate, Function<? super T, ? extends A> function) { return ListIterate.collectIf(list, predicate, function, FastList.<A>newList()); }
@Override public <V, R extends Collection<V>> R collectIf( Predicate<? super T> predicate, Function<? super T, ? extends V> function, R target) { return ListIterate.collectIf(this, predicate, function, target); }
/** * @see RichIterable#collectIf(Predicate, Function, Collection) */ 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"); }
return ListIterate.collectIf((List<T>) iterable, predicate, function);