Created
March 26, 2018 10:42
-
-
Save turastory/2aa752bda8ea82077cbf4ce4e5c559e8 to your computer and use it in GitHub Desktop.
Runner, for Runnable chain
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface Runner { | |
void run(); | |
default Runner andThen(Runner after) { | |
return () -> { run(); after.run(); }; | |
} | |
default Runnable convert() { | |
return this::run; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment