// Source - https://stackoverflow.com/a/62434813 // Posted by gabriel119435, modified by community. See post 'Timeline' for change history // Retrieved 2026-04-30, License - CC BY-SA 4.0
() means no input/output (void)
Supplier : () -> x
Consumer : x -> ()
BiConsumer : x, y -> ()
Callable : () -> x throws ex
Runnable : () -> ()
Function : x -> y
BiFunction : x,y -> z
Predicate : x -> boolean
UnaryOperator : x1 -> x2
BinaryOperator : x1,x2 -> x3