Skip to content

Instantly share code, notes, and snippets.

View weilueluo's full-sized avatar
code ^ sleep

Weilue Luo weilueluo

code ^ sleep
View GitHub Profile
@weilueluo
weilueluo / Java types by args and return
Last active May 29, 2025 22:16
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