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

co.pragmati.function.unchecked.UncheckedSupplier Maven / Gradle / Ivy

The newest version!
package co.pragmati.function.unchecked;


/**
 * Supplier with unchecked exception
 * @param 
 *
 * @author jmbataller
 */
@FunctionalInterface
public interface UncheckedSupplier {

    T getThrows() throws Exception;

    default T get() throws Exception {
        try {
            return getThrows();
        } catch (RuntimeException e) {
            throw e;
        } catch (java.lang.Exception e) {
            throw new RuntimeException(e);
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy