Predicates and BiPredicate Functional Interface - JAVA 8
Predicates and BiPredicate Functional Interface In my previous blog, I’ve already talked about Lambda Expression and Functional Interface . In this blog, I’ll talk about predefined Functional Interface which has been introduced in JAVA 8 under Java.util.Function. Predicate is a Functional Interface which accept single input and return response in either True or False. It is very similar to Predicates that we have learnt in School i.e. which takes a value and return only Boolean value. The functional method of Predicate is test(Object). @FunctionalInterface Public interface Predicate<T> Here is a simple source code of java.util.function.Predicate package java.util.function; import java.util.Objects; @FunctionalInterface public interface Predicate<T> { boolean test(T t); } Where Test (T t) is an abstract method where T is the type o...