Java tutorial
//package com.java2s; import java.util.*; import java.util.function.Predicate; public class Main { static <E> List<E> filter(List<E> elements, Predicate<E> filter) { //TODO Implement me List<E> value = new ArrayList<>(); for (E element : elements) { if (!filter.equals(element)) { value.add(element); } } return value; } }