2019-03-07 11:32:45 +01:00
|
|
|
package org.warp.jcwdb.functionalinterfaces;
|
2019-01-31 20:05:23 +01:00
|
|
|
|
|
|
|
import java.io.IOException;
|
|
|
|
import java.util.Objects;
|
|
|
|
|
|
|
|
@FunctionalInterface
|
|
|
|
public interface ConsumerWithIO<T> {
|
|
|
|
|
|
|
|
void accept(T t) throws IOException;
|
|
|
|
|
|
|
|
default ConsumerWithIO<T> andThen(ConsumerWithIO<? super T> after) {
|
|
|
|
Objects.requireNonNull(after);
|
|
|
|
return (T t) -> { accept(t); after.accept(t); };
|
|
|
|
}
|
|
|
|
}
|