]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.scl.runtime/src/org/simantics/scl/runtime/function/UnsaturatedFunction5.java
Merge branch 'feature/funcwrite'
[simantics/platform.git] / bundles / org.simantics.scl.runtime / src / org / simantics / scl / runtime / function / UnsaturatedFunction5.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 UnsaturatedFunction5 implements Function {
9     private final Function f;
10     private final Object p0;
11     private final Object p1;
12     private final Object p2;
13     private final Object p3;
14     private final Object p4;
15
16     public UnsaturatedFunction5(Function f, Object p0, Object p1, Object p2, Object p3, Object p4) {
17         this.f = f;
18         this.p0 = p0;
19         this.p1 = p1;
20         this.p2 = p2;
21         this.p3 = p3;
22         this.p4 = p4;
23     }
24
25     @Override
26     public Object apply(Object p5) {
27         return f.apply(p0, p1, p2, p3, p4, p5);
28     }
29
30     @Override
31     public Object apply(Object p5, Object p6) {
32         return f.apply(p0, p1, p2, p3, p4, p5, p6);
33     }
34
35     @Override
36     public Object apply(Object p5, Object p6, Object p7) {
37         return f.apply(p0, p1, p2, p3, p4, p5, p6, p7);
38     }
39
40     @Override
41     public Object apply(Object p5, Object p6, Object p7, Object p8) {
42         return f.applyArray(p0, p1, p2, p3, p4, p5, p6, p7, p8);
43     }
44
45     @Override
46     public Object apply(Object p5, Object p6, Object p7, Object p8, Object p9) {
47         return f.applyArray(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9);
48     }
49
50     @Override
51     public Object apply(Object p5, Object p6, Object p7, Object p8, Object p9, Object p10) {
52         return f.applyArray(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10);
53     }
54
55     @Override
56     public Object apply(Object p5, Object p6, Object p7, Object p8, Object p9, Object p10, Object p11) {
57         return f.applyArray(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11);
58     }
59
60     @Override
61     public Object apply(Object p5, Object p6, Object p7, Object p8, Object p9, Object p10, Object p11, Object p12) {
62         return f.applyArray(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12);
63     }
64
65     @Override
66     public Object applyArray(Object ... ps) {
67         Object[] nps = new Object[ps.length + 5];
68         nps[0] = p0;
69         nps[1] = p1;
70         nps[2] = p2;
71         nps[3] = p3;
72         nps[4] = p4;
73         for(int i=0;i<ps.length;++i)
74             nps[i + 5] = ps[i];
75         return f.applyArray(nps);
76     }
77
78     @Override
79     public String toString() {
80         StringBuilder sb = new StringBuilder();
81         sb.append("(").append(f);
82         sb.append(" ").append(p0);
83         sb.append(" ").append(p1);
84         sb.append(" ").append(p2);
85         sb.append(" ").append(p3);
86         sb.append(" ").append(p4);
87         sb.append(")");
88         return sb.toString();
89     }
90
91     @Override
92     public int hashCode() {
93         int result = f.hashCode();
94         result = 31 * result + (p0 == null ? 0 : p0.hashCode());
95         result = 31 * result + (p1 == null ? 0 : p1.hashCode());
96         result = 31 * result + (p2 == null ? 0 : p2.hashCode());
97         result = 31 * result + (p3 == null ? 0 : p3.hashCode());
98         result = 31 * result + (p4 == null ? 0 : p4.hashCode());
99         return result;
100     }
101
102     @Override
103     public boolean equals(Object obj) {
104         if (this == obj)
105             return true;
106         if (obj == null)
107             return false;
108         if (getClass() != obj.getClass())
109             return false;
110         UnsaturatedFunction5 other = (UnsaturatedFunction5) obj;
111         if(!f.equals(other.f))
112             return false;
113         if(p0 == null) {
114             if (other.p0 != null)
115                 return false;
116         } else if (!p0.equals(other.p0))
117             return false;
118         if(p1 == null) {
119             if (other.p1 != null)
120                 return false;
121         } else if (!p1.equals(other.p1))
122             return false;
123         if(p2 == null) {
124             if (other.p2 != null)
125                 return false;
126         } else if (!p2.equals(other.p2))
127             return false;
128         if(p3 == null) {
129             if (other.p3 != null)
130                 return false;
131         } else if (!p3.equals(other.p3))
132             return false;
133         if(p4 == null) {
134             if (other.p4 != null)
135                 return false;
136         } else if (!p4.equals(other.p4))
137             return false;
138         return true;
139     }
140
141 }