com.igormaznitsa.meta.common.interfaces.CheckedConsumer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of meta-utils Show documentation
Show all versions of meta-utils Show documentation
Set of utilities and auxiliary classes to make development easier.
The newest version!
package com.igormaznitsa.meta.common.interfaces;
import static java.util.Objects.requireNonNull;
/**
* Consumer allows throw checked exception.
*
* @param type of argument
* @since 1.2.1
*/
@FunctionalInterface
public interface CheckedConsumer {
default CheckedConsumer andThen(CheckedConsumer super T> after) {
requireNonNull(after);
return (T t) -> {
accept(t);
after.accept(t);
};
}
void accept(T t) throws Exception;
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy