All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.fridujo.automocker.utils.ThrowingConsumer Maven / Gradle / Ivy

The newest version!
package com.github.fridujo.automocker.utils;

import java.util.function.Consumer;

@FunctionalInterface
public interface ThrowingConsumer {

    static  Consumer silent(ThrowingConsumer throwing) {
        return t -> {
            try {
                throwing.accept(t);
            } catch (Exception e) {
                throw LamdaLuggageException.wrap(e);
            }
        };
    }

    void accept(T t) throws Exception;
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy