a-foundation/src/main/java/com/ajjpj/afoundation/collection/ACollectionHelper.java
public static <T, E extends Throwable> List<T> filter(List<T> coll, APredicate<? super T, E> pred) throws E {
        final List<T> result = createEmptyListOfType (coll, false);
        for(T o: coll) {
            if(pred.apply(o)) {
                result.add(o);
            }
        }
        return result;
    }
public static <T, E extends Throwable> List<T> filter(List<T> coll, APredicate<? super T, E> pred) throws E {
        final List<T> result = createEmptyListOfType (coll, false);
        for(T o: coll) {
            if(pred.apply(o)) {
                result.add(o);
            }
        }
        return result;
    }
public static < T , E extends Throwable > List < T > filter ( List < T > coll , APredicate < ? super T , E > pred ) throws E { final List < T > result = createEmptyListOfType ( coll , false ) ; for ( T o : coll ) { if ( pred . apply ( o ) ) { result . add ( o ) ; } } return result ; }
Matches all elements of a collection against a predicate, creating a new collection from those that match.
Matches all elements of a collection against a predicate creating a new collection from those that match .