com.kirekov.sneaky.lambda.CheckedConsumer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sneaky-java Show documentation
Show all versions of sneaky-java Show documentation
Java utilities to throw checked exceptions in a "sneaky" way
package com.kirekov.sneaky.lambda;
import java.util.function.Consumer;
/**
* Consumer that may throw {@linkplain Exception}.
*
* @param the type of the input parameter
* @see Consumer
*/
@FunctionalInterface
public interface CheckedConsumer {
/**
* Performs this operation on the given argument.
*
* @param t the input argument
* @throws Exception if any error occurs
*/
void accept(T t) throws Exception;
}