class ACollectionHelper {

    public static <T, E extends Throwable> Collection<T> filter(Iterable<T> coll, APredicate<? super T, E> pred) throws E {
        final List<T> result = new ArrayList<>();
        for(T o: coll) {
            if(pred.apply(o)) {
                result.add(o);
            }
        }
        return result;
    }

}