Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
org.lambda.functions.Functions Maven / Gradle / Ivy
package org.lambda.functions;
import com.spun.util.ObjectUtils;
public class Functions
{
public static Function1 unchecked(Function1WithException function)
{
return i -> ObjectUtils.throwAsError(() -> function.call(i));
}
public static Function2 unchecked(Function2WithException function)
{
return (p1, p2) -> ObjectUtils.throwAsError(() -> function.call(p1, p2));
}
public static Function3 unchecked(
Function3WithException function)
{
return (p1, p2, p3) -> ObjectUtils.throwAsError(() -> function.call(p1, p2, p3));
}
public static Function4 unchecked(
Function4WithException function)
{
return (p1, p2, p3, p4) -> ObjectUtils.throwAsError(() -> function.call(p1, p2, p3, p4));
}
public static Function5 unchecked(
Function5WithException function)
{
return (p1, p2, p3, p4, p5) -> ObjectUtils.throwAsError(() -> function.call(p1, p2, p3, p4, p5));
}
public static Function6 unchecked(
Function6WithException function)
{
return (p1, p2, p3, p4, p5, p6) -> ObjectUtils.throwAsError(() -> function.call(p1, p2, p3, p4, p5, p6));
}
public static Function7 unchecked(
Function7WithException function)
{
return (p1, p2, p3, p4, p5, p6, p7) -> ObjectUtils
.throwAsError(() -> function.call(p1, p2, p3, p4, p5, p6, p7));
}
public static Function8 unchecked(
Function8WithException function)
{
return (p1, p2, p3, p4, p5, p6, p7, p8) -> ObjectUtils
.throwAsError(() -> function.call(p1, p2, p3, p4, p5, p6, p7, p8));
}
public static Function9 unchecked(
Function9WithException function)
{
return (p1, p2, p3, p4, p5, p6, p7, p8, p9) -> ObjectUtils
.throwAsError(() -> function.call(p1, p2, p3, p4, p5, p6, p7, p8, p9));
}
}