Help with Functional programming with Java Camera.java code
posted 2 years ago
In this code, the method setFilters is expecting a List of Functional Interfaces (Function<Color,Color> filters).
I don't understand how the code compiles successfully because in the main method we are calling setFilters with a method-reference argument (Color::brighter, Color::darker) which expects a list of Functional interfaces. However Color is not a functional interface.