Let\'s say I have the following functional interface in Java 8:
interface Action { U execute(T t); }
And for some cases I ne
Use Supplier if it takes nothing, but returns something.
Use Consumer if it takes something, but returns nothing.
Use Callable if it returns a result and might throw (most akin to Thunk in general CS terms).
Use Runnable if it does neither and cannot throw.