Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @FunctionalInterface
- public interface ThrowableConsumer<T> extends Consumer<T> {
- @Override
- default void accept(T t) {
- try {
- acceptThrowable(t);
- } catch (Exception ex) {
- throw new RuntimeException(ex);
- }
- }
- void acceptThrowable(T t) throws Exception;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement