]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.scl.runtime/src/org/simantics/scl/runtime/function/UnsaturatedFunction1.java
Merge branch 'feature/funcwrite'
[simantics/platform.git] / bundles / org.simantics.scl.runtime / src / org / simantics / scl / runtime / function / UnsaturatedFunction1.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 UnsaturatedFunction1 implements Function {
9     private final Function f;
10     private final Object p0;
11
12     public UnsaturatedFunction1(Function f, Object p0) {
13         this.f = f;
14         this.p0 = p0;
15     }
16
17     @Override
18     public Object apply(Object p1) {
19         return f.apply(p0, p1);
20     }
21
22     @Override
23     public Object apply(Object p1, Object p2) {
24         return f.apply(p0, p1, p2);
25     }
26
27     @Override
28     public Object apply(Object p1, Object p2, Object p3) {
29         return f.apply(p0, p1, p2, p3);
30     }
31
32     @Override
33     public Object apply(Object p1, Object p2, Object p3, Object p4) {
34         return f.apply(p0, p1, p2, p3, p4);
35     }
36
37     @Override
38     public Object apply(Object p1, Object p2, Object p3, Object p4, Object p5) {
39         return f.apply(p0, p1, p2, p3, p4, p5);
40     }
41
42     @Override
43     public Object apply(Object p1, Object p2, Object p3, Object p4, Object p5, Object p6) {
44         return f.apply(p0, p1, p2, p3, p4, p5, p6);
45     }
46
47     @Override
48     public Object apply(Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7) {
49         return f.apply(p0, p1, p2, p3, p4, p5, p6, p7);
50     }
51
52     @Override
53     public Object apply(Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8) {
54         return f.applyArray(p0, p1, p2, p3, p4, p5, p6, p7, p8);
55     }
56
57     @Override
58     public Object applyArray(Object ... ps) {
59         Object[] nps = new Object[ps.length + 1];
60         nps[0] = p0;
61         for(int i=0;i<ps.length;++i)
62             nps[i + 1] = ps[i];
63         return f.applyArray(nps);
64     }
65
66     @Override
67     public String toString() {
68         StringBuilder sb = new StringBuilder();
69         sb.append("(").append(f);
70         sb.append(" ").append(p0);
71         sb.append(")");
72         return sb.toString();
73     }
74
75     @Override
76     public int hashCode() {
77         int result = f.hashCode();
78         result = 31 * result + (p0 == null ? 0 : p0.hashCode());
79         return result;
80     }
81
82     @Override
83     public boolean equals(Object obj) {
84         if (this == obj)
85             return true;
86         if (obj == null)
87             return false;
88         if (getClass() != obj.getClass())
89             return false;
90         UnsaturatedFunction1 other = (UnsaturatedFunction1) obj;
91         if(!f.equals(other.f))
92             return false;
93         if(p0 == null) {
94             if (other.p0 != null)
95                 return false;
96         } else if (!p0.equals(other.p0))
97             return false;
98         return true;
99     }
100
101 }