At work today I ended up having to write this because Callable<V> wasn’t flexible enough for what I needed:
public interface Operation<V, E extends Throwable> {
V execute() throws E;
}
…would love to see this (as well as a Pair<A,B> class) in a future cut of Java.
One Comment
I know I had the same problem!!!