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

com.github.phantomthief.util.ThrowableConsumer Maven / Gradle / Ivy

There is a newer version: 0.1.55
Show newest version
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 after) {
        requireNonNull(after);
        return t -> {
            accept(t);
            after.accept(t);
        };
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy