Skip to content

Instantly share code, notes, and snippets.

@weilueluo
Last active December 29, 2022 00:09
Show Gist options
  • Save weilueluo/652ace1b895f579757f8a6b36fa74b0b to your computer and use it in GitHub Desktop.
Save weilueluo/652ace1b895f579757f8a6b36fa74b0b to your computer and use it in GitHub Desktop.
Differences between Supplier, Consumer, Callable, Runnable, Function, BiFunction, Predicate, UnaryOperator, BinaryOperator
Supplier () -> x
Consumer x -> ()
Callable () -> x throws ex
Runnable () -> ()
Function x -> y
BiFunction x,y -> z
Predicate x -> boolean
UnaryOperator x1 -> x2
BinaryOperator x1,x2 -> x3
// source: https://stackoverflow.com/a/62434813/6880256
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment