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

org.rx.util.function.BiFunc Maven / Gradle / Ivy

There is a newer version: 3.0.0
Show newest version
package org.rx.util.function;

import org.rx.exception.InvalidException;

import java.io.Serializable;
import java.util.function.Function;

@FunctionalInterface
public interface BiFunc extends Serializable {
    TR invoke(TP param) throws Throwable;

    default Function toFunction() {
        return p -> {
            try {
                return invoke(p);
            } catch (Throwable e) {
                throw InvalidException.sneaky(e);
            }
        };
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy