a-foundation/src/main/java/com/ajjpj/afoundation/collection/ACollectionHelper.java
public static <T, E extends Throwable> Set<T> filter(Set<T> coll, APredicate<? super T, E> pred) throws E {
        final Set<T> result = createEmptySetOfType(coll, false);
        for(T o: coll) {
            if(pred.apply(o)) {
                result.add(o);
            }
        }
        return result;
    }
public static <T, E extends Throwable> Set<T> filter(Set<T> coll, APredicate<? super T, E> pred) throws E {
        final Set<T> result = createEmptySetOfType(coll, false);
        for(T o: coll) {
            if(pred.apply(o)) {
                result.add(o);
            }
        }
        return result;
    }
public static < T , E extends Throwable > Set < T > filter ( Set < T > coll , APredicate < ? super T , E > pred ) throws E { final Set < T > result = createEmptySetOfType ( 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 .