Lambda expressions are syntax sugar for the use of the java.util.functions package interfaces. The most important ones are the following:
- BiConsumer<T,U>: An operation that consumes two input arguments and returns no result, usually used in the maps forEach method. It has support for chaining BiConsumers by using the andThen method.
- BiFunction<T,U,R>: A function that accepts two arguments and produces a result, used by calling its apply method.
- BinaryOperator<T>: An operation upon two operands of the same type, producing a result of the same type as the operands, used by calling its inherited apply method. It statically offers the minBy and maxBy methods, which return the lesser/greater of the two elements.
- BiPredicate<T,U> ...