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

dev.youshallnotpass.inspection.InspectionBiFunc Maven / Gradle / Ivy

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();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy