class TransformUtils {

    public static <T> Collection<T> filter(Collection<T> items, Predicate<T> predicate) {
        Collection<T> result = new ArrayList<>();
        for (T item : items) {
            if (predicate.condition(item)) {
                result.add(item);
            }
        }
        return result;
    }

}