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

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

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

/**
 * Predictate that throws unchecked exceptions
 * @param 
 *
 * @author jmbataller
 */
@FunctionalInterface
public interface UncheckedPredicate {

    boolean testThrows(T t) throws Exception;

    default boolean test(T t) {
        try {
            return testThrows(t);
        } catch (RuntimeException e) {
            throw e;
        } catch (java.lang.Exception e) {
            throw new RuntimeException(e);
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy