2 * This code is generated in org.simantics.scl.runtime.generation.GenerateFunctions.
3 * Do not edit manually!
5 package org.simantics.scl.runtime.function;
7 import java.util.Arrays;
9 @SuppressWarnings("all")
10 public abstract class FunctionImpl4<P0,P1,P2,P3,R> implements Function<P0,P1,P2,P3,Object,Object,Object,Object,Object,Object,Object,R,Object,Object,Object,Object> {
12 public Object apply(Object p0) {
13 return new UnsaturatedFunction1(this, p0);
17 public Object apply(Object p0, Object p1) {
18 return new UnsaturatedFunction2(this, p0, p1);
22 public Object apply(Object p0, Object p1, Object p2) {
23 return new UnsaturatedFunction3(this, p0, p1, p2);
27 public abstract R apply(P0 p0, P1 p1, P2 p2, P3 p3);
30 public Object apply(Object p0, Object p1, Object p2, Object p3, Object p4) {
32 return ((Function)apply((P0)p0, (P1)p1, (P2)p2, (P3)p3)).apply(p4);
33 } catch(ClassCastException e) {
34 throw new CalledWithTooManyParameters();
39 public Object apply(Object p0, Object p1, Object p2, Object p3, Object p4, Object p5) {
41 return ((Function)apply((P0)p0, (P1)p1, (P2)p2, (P3)p3)).apply(p4, p5);
42 } catch(ClassCastException e) {
43 throw new CalledWithTooManyParameters();
48 public Object apply(Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6) {
50 return ((Function)apply((P0)p0, (P1)p1, (P2)p2, (P3)p3)).apply(p4, p5, p6);
51 } catch(ClassCastException e) {
52 throw new CalledWithTooManyParameters();
57 public Object apply(Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7) {
59 return ((Function)apply((P0)p0, (P1)p1, (P2)p2, (P3)p3)).apply(p4, p5, p6, p7);
60 } catch(ClassCastException e) {
61 throw new CalledWithTooManyParameters();
66 public Object applyArray(Object ... ps) {
71 return new UnsaturatedFunction1(this, ps[0]);
73 return new UnsaturatedFunction2(this, ps[0], ps[1]);
75 return new UnsaturatedFunction3(this, ps[0], ps[1], ps[2]);
77 return apply((P0)ps[0], (P1)ps[1], (P2)ps[2], (P3)ps[3]);
80 return ((Function)apply((P0)ps[0], (P1)ps[1], (P2)ps[2], (P3)ps[3])).apply(ps[4]);
81 } catch(ClassCastException e) {
82 throw new CalledWithTooManyParameters();
86 return ((Function)apply((P0)ps[0], (P1)ps[1], (P2)ps[2], (P3)ps[3])).apply(ps[4], ps[5]);
87 } catch(ClassCastException e) {
88 throw new CalledWithTooManyParameters();
92 return ((Function)apply((P0)ps[0], (P1)ps[1], (P2)ps[2], (P3)ps[3])).apply(ps[4], ps[5], ps[6]);
93 } catch(ClassCastException e) {
94 throw new CalledWithTooManyParameters();
98 return ((Function)apply((P0)ps[0], (P1)ps[1], (P2)ps[2], (P3)ps[3])).apply(ps[4], ps[5], ps[6], ps[7]);
99 } catch(ClassCastException e) {
100 throw new CalledWithTooManyParameters();
104 return ((Function)apply((P0)ps[0], (P1)ps[1], (P2)ps[2], (P3)ps[3])).apply(ps[4], ps[5], ps[6], ps[7], ps[8]);
105 } catch(ClassCastException e) {
106 throw new CalledWithTooManyParameters();
110 return ((Function)apply((P0)ps[0], (P1)ps[1], (P2)ps[2], (P3)ps[3])).apply(ps[4], ps[5], ps[6], ps[7], ps[8], ps[9]);
111 } catch(ClassCastException e) {
112 throw new CalledWithTooManyParameters();
116 return ((Function)apply((P0)ps[0], (P1)ps[1], (P2)ps[2], (P3)ps[3])).apply(ps[4], ps[5], ps[6], ps[7], ps[8], ps[9], ps[10]);
117 } catch(ClassCastException e) {
118 throw new CalledWithTooManyParameters();
122 return ((Function)apply((P0)ps[0], (P1)ps[1], (P2)ps[2], (P3)ps[3])).apply(ps[4], ps[5], ps[6], ps[7], ps[8], ps[9], ps[10], ps[11]);
123 } catch(ClassCastException e) {
124 throw new CalledWithTooManyParameters();
128 return ((Function)apply((P0)ps[0], (P1)ps[1], (P2)ps[2], (P3)ps[3])).apply(Arrays.copyOfRange(ps, 4, ps.length));
129 } catch(ClassCastException e) {
130 throw new CalledWithTooManyParameters();