@SuppressWarnings("unchecked") public <RT> Functions.Function0<RT> createFunction(String expression, Class<RT> returnType) { return (Function0<RT>) internalCreateFunction(expression, returnType); }
@SuppressWarnings("unchecked") public <RT, T> Functions.Function1<T, RT> createFunction(String body, Class<RT> returnType, Class<T> paramType) { return (Functions.Function1<T, RT>) internalCreateFunction(body, returnType, Tuples.pair((Type) paramType, "p")); }
@SuppressWarnings("unchecked") public <RT, T1, T2> Functions.Function2<T1, T2, RT> createFunction( String body, Class<RT> returnType, Class<T1> paramType1, Class<T2> paramType2) { return (Functions.Function2<T1, T2, RT>) internalCreateFunction(body, returnType, Tuples.pair((Type) paramType1, "p1"), Tuples.pair((Type) paramType2, "p2")); }