Annotate functional interfaces

Occasionally, when you can't find what you need among the JDK's standard functional interfaces, then you'll need to define your own functional interface. When you do so, you should annotate it with @FunctionalInterface.

Using @FunctionalInterface will:

See Also :
Prefer standard functional interfaces