au.csiro.sparkle.common.ThrowingConsumer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of variant-spark_2.11 Show documentation
Show all versions of variant-spark_2.11 Show documentation
Genomic variants interpretation toolkit
The newest version!
package au.csiro.sparkle.common;
import java.util.function.Consumer;
public abstract class ThrowingConsumer {
public abstract void accept(T t) throws Exception;
public static Consumer wrap(final ThrowingConsumer c) {
return t -> {
try {
c.accept(t);
} catch (Exception ex) {
throw new RuntimeException(ex);
}
};
}
}