Example usage for java.util.function Predicate equals

List of usage examples for java.util.function Predicate equals

Introduction

In this page you can find the example usage for java.util.function Predicate equals.

Prototype

public boolean equals(Object obj) 

Source Link

Document

Indicates whether some other object is "equal to" this one.

Usage

From source file:Main.java

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);//  ww  w.j  a  va 2 s  . co  m
        }
    }
    return value;
}