org.rx.util.function.BiFunc Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rxlib Show documentation
Show all versions of rxlib Show documentation
A set of utilities for Java
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);
}
};
}
}