Tuesday, December 31, 2019

Functional Interfaces

The Supplier interface is a generic functional interface with a single method that has no arguments and returns a value of a parameterized type.

The Consumer functional interface. Its single method takes a parameter and returns void.

The Function represents a function that accepts one argument and produces a result.



BiFunction represents a function that accepts two arguments and produces a result. This is the two-arity specialization of Function.


BinaryOperator Represents an operation upon two operands of the same type, producing a result of the same type as the operands.


(freely extracted from https://www.baeldung.com/java-completablefuture

and from https://www.baeldung.com/java-bifunction-interface


)




No comments: