public static List<Apple> filter(List<Apple> inventory, ApplePredicate applePredicate) {
        List<Apple> result = new ArrayList(); // No diamond JAVA 8 Feature required on right side
        for(Apple apple:inventory) {
            if(applePredicate.test(apple)){
                result.add(apple);
            }
        }
        return result;
    }