Skip to content

Glossary: Java Beyond the Basics

Predicate, Function, Consumer, Supplier

Also written: Consumer, Predicate, Function, Supplier, BiFunction, UnaryOperator, java.util.function

Ready-made functional interfaces for lambdas: Predicate tests a value, Function converts one, Consumer uses one up, Supplier makes one, BiFunction takes two inputs, and UnaryOperator is a Function with the same input and output type.

Where the book teaches it

Related terms

Functional interfaceLambda