package it.cavallium.strangedb.functionalinterfaces; import java.io.IOException; import java.util.Objects; @FunctionalInterface public interface ConsumerWithIO { void accept(T t) throws IOException; default ConsumerWithIO andThen(ConsumerWithIO after) { Objects.requireNonNull(after); return (T t) -> { accept(t); after.accept(t); }; } }