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