![JAR search and dependency download from the Maven repository](/logo.png)
net.diversionmc.error.TryP Maven / Gradle / Ivy
package net.diversionmc.error;
import java.util.function.Predicate;
@FunctionalInterface
public interface TryP extends Predicate {
boolean tryTest(T t) throws E;
@SuppressWarnings("OverlyBroadCatchBlock")
default boolean test(T t) {
try {
return tryTest(t);
} catch (Exception e) {
throw new ResultException(e);
}
}
static TryP of(Predicate f) {
return f::test;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy