Java Code Examples for org.eclipse.xtext.xbase.lib.Functions#Function2
The following examples show how to use
org.eclipse.xtext.xbase.lib.Functions#Function2 .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: OnTheFlyJavaCompiler.java From xtext-extras with Eclipse Public License 2.0 | 5 votes |
@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")); }
Example 2
Source File: OnTheFlyJavaCompiler.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
@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")); }
Example 3
Source File: ClosureClient.java From xtext-extras with Eclipse Public License 2.0 | 4 votes |
public <P1,P2,T> T invoke2(Functions.Function2<P1, P2, T> fun, P1 p1, P2 p2) { return fun.apply(p1, p2); }
Example 4
Source File: ClosureClient.java From xtext-extras with Eclipse Public License 2.0 | 4 votes |
public <P1,P2,T> T invoke2(Functions.Function2<P1, P2, T> fun, P1 p1, P2 p2) { return fun.apply(p1, p2); }
Example 5
Source File: ClosureClient.java From xtext-eclipse with Eclipse Public License 2.0 | 4 votes |
public <P1,P2,T> T invoke2(Functions.Function2<P1, P2, T> fun, P1 p1, P2 p2) { return fun.apply(p1, p2); }
Example 6
Source File: ClosureClient.java From xtext-xtend with Eclipse Public License 2.0 | 4 votes |
public <P1,P2,T> T invoke2(Functions.Function2<P1, P2, T> fun, P1 p1, P2 p2) { return fun.apply(p1, p2); }
Example 7
Source File: DefaultEcoreElementFactoryTest.java From xtext-core with Eclipse Public License 2.0 | 4 votes |
public MockedConverterService(Functions.Function2<String, INode, Object> toValueFunction) { this.toValueFunction = toValueFunction; }