Prefer standard functional interfaces

For many cases, instead of defining your own functional interfaces, you can use the standard functional interfaces defined by the JDK: There are a large number of standard functional interfaces. They're generic, so they can handle any type. The 6 most commonly-used ones likely cover the majority of cases:

Interface Method
Predicate<T> boolean test(T thing)
Consumer<T> void accept(T thing)
Supplier<T> T get()
Function<T,R> R apply(T thing)
UnaryOperator<T> T apply(T thing)
BinayOperator<T> T apply(T thing1, T thing2)

You should be familiar with the above core functional interfaces. Whenever you can use them, you probably should use them.

See Also :
Annotate functional interfaces