com.github.phantomthief.util.ThrowableConsumer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of more-lambdas Show documentation
Show all versions of more-lambdas Show documentation
Some useful lambda implements for Java 8.
package com.github.phantomthief.util;
import static java.util.Objects.requireNonNull;
/**
* @author w.vela
*/
@FunctionalInterface
public interface ThrowableConsumer {
void accept(T t) throws X;
default ThrowableConsumer andThen(ThrowableConsumer super T, X> after) {
requireNonNull(after);
return t -> {
accept(t);
after.accept(t);
};
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy