dev.youshallnotpass.inspection.InspectionBiFunc Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-inspections Show documentation
Show all versions of java-inspections Show documentation
Java inspections library for youshallnotpass
The newest version!
package dev.youshallnotpass.inspection;
import org.cactoos.BiFunc;
import org.cactoos.scalar.Checked;
public final class InspectionBiFunc implements BiFunc {
private final BiFunc func;
public InspectionBiFunc(final BiFunc fnc) {
this.func = fnc;
}
@Override
public Z apply(final X first, final Y second) throws InspectionException {
return new Checked<>(
() -> this.func.apply(first, second),
InspectionException::new
).value();
}
}