public interface ActionInterface {
void call();
}
I want to use it like this:
public void setQuitAction(ActionInterface action) {
quitAction = action;
}
// and somewhere else:
evaluator.setQuitAction(() -> isLooping = false);
I feel like there should be something like ActionInterface included with all those functional interfaces. All I can come up with is Runnable, which makes you think of threads not lambdas. What's the way to do this in Java?
Spoiler

New Topic/Question
Reply



MultiQuote



|