Let\'s say I have the following functional interface in Java 8:
interface Action {
U execute(T t);
}
And for some cases I ne
I think this table is short and usefull:
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
As said on the other answers, the appropriate option for this problem is a Runnable