]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.scl.runtime/src/org/simantics/scl/runtime/function/UnsaturatedFunctionN.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.scl.runtime / src / org / simantics / scl / runtime / function / UnsaturatedFunctionN.java
1 /**
2  * This code is generated in org.simantics.scl.runtime.generation.GenerateFunctions.
3  * Do not edit manually!
4  */
5 package org.simantics.scl.runtime.function;
6
7 @SuppressWarnings("all")
8 public class UnsaturatedFunctionN implements Function {
9     private final Function f;
10     private final Object[] ps;
11
12     public UnsaturatedFunctionN(Function f, Object ... ps) {
13         this.f = f;
14         this.ps = ps;
15     }
16
17     @Override
18     public Object apply(Object p1) {
19         Object[] nps = new Object[ps.length + 1];
20         System.arraycopy(ps, 0, nps, 0, ps.length);
21         nps[ps.length+0] = p1;
22         return f.applyArray(nps);
23     }
24
25     @Override
26     public Object apply(Object p1, Object p2) {
27         Object[] nps = new Object[ps.length + 2];
28         System.arraycopy(ps, 0, nps, 0, ps.length);
29         nps[ps.length+0] = p1;
30         nps[ps.length+1] = p2;
31         return f.applyArray(nps);
32     }
33
34     @Override
35     public Object apply(Object p1, Object p2, Object p3) {
36         Object[] nps = new Object[ps.length + 3];
37         System.arraycopy(ps, 0, nps, 0, ps.length);
38         nps[ps.length+0] = p1;
39         nps[ps.length+1] = p2;
40         nps[ps.length+2] = p3;
41         return f.applyArray(nps);
42     }
43
44     @Override
45     public Object apply(Object p1, Object p2, Object p3, Object p4) {
46         Object[] nps = new Object[ps.length + 4];
47         System.arraycopy(ps, 0, nps, 0, ps.length);
48         nps[ps.length+0] = p1;
49         nps[ps.length+1] = p2;
50         nps[ps.length+2] = p3;
51         nps[ps.length+3] = p4;
52         return f.applyArray(nps);
53     }
54
55     @Override
56     public Object apply(Object p1, Object p2, Object p3, Object p4, Object p5) {
57         Object[] nps = new Object[ps.length + 5];
58         System.arraycopy(ps, 0, nps, 0, ps.length);
59         nps[ps.length+0] = p1;
60         nps[ps.length+1] = p2;
61         nps[ps.length+2] = p3;
62         nps[ps.length+3] = p4;
63         nps[ps.length+4] = p5;
64         return f.applyArray(nps);
65     }
66
67     @Override
68     public Object apply(Object p1, Object p2, Object p3, Object p4, Object p5, Object p6) {
69         Object[] nps = new Object[ps.length + 6];
70         System.arraycopy(ps, 0, nps, 0, ps.length);
71         nps[ps.length+0] = p1;
72         nps[ps.length+1] = p2;
73         nps[ps.length+2] = p3;
74         nps[ps.length+3] = p4;
75         nps[ps.length+4] = p5;
76         nps[ps.length+5] = p6;
77         return f.applyArray(nps);
78     }
79
80     @Override
81     public Object apply(Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7) {
82         Object[] nps = new Object[ps.length + 7];
83         System.arraycopy(ps, 0, nps, 0, ps.length);
84         nps[ps.length+0] = p1;
85         nps[ps.length+1] = p2;
86         nps[ps.length+2] = p3;
87         nps[ps.length+3] = p4;
88         nps[ps.length+4] = p5;
89         nps[ps.length+5] = p6;
90         nps[ps.length+6] = p7;
91         return f.applyArray(nps);
92     }
93
94     @Override
95     public Object apply(Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8) {
96         Object[] nps = new Object[ps.length + 8];
97         System.arraycopy(ps, 0, nps, 0, ps.length);
98         nps[ps.length+0] = p1;
99         nps[ps.length+1] = p2;
100         nps[ps.length+2] = p3;
101         nps[ps.length+3] = p4;
102         nps[ps.length+4] = p5;
103         nps[ps.length+5] = p6;
104         nps[ps.length+6] = p7;
105         nps[ps.length+7] = p8;
106         return f.applyArray(nps);
107     }
108
109     @Override
110     public Object applyArray(Object ... ops) {
111         Object[] nps = new Object[ps.length + ops.length];
112         System.arraycopy(ps, 0, nps, 0, ps.length);
113         System.arraycopy(ops, 0, nps, ps.length, ops.length);
114         return f.applyArray(nps);
115     }
116     @Override
117     public String toString() {
118         StringBuilder sb = new StringBuilder();
119         sb.append("(").append(f);
120         for (Object p : ps)
121             sb.append(" ").append(p);
122         sb.append(")");
123         return sb.toString();
124     }
125 }