]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.scl.runtime/src/org/simantics/scl/runtime/tuple/Tuple6.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.scl.runtime / src / org / simantics / scl / runtime / tuple / Tuple6.java
1 /**
2  * This code is generated in org.simantics.scl.runtime.generation.GenerateTuples.
3  * Do not edit manually!
4  */
5 package org.simantics.scl.runtime.tuple;
6
7 public class Tuple6 implements Tuple {
8     public final Object c0;
9     public final Object c1;
10     public final Object c2;
11     public final Object c3;
12     public final Object c4;
13     public final Object c5;
14
15     public Tuple6(Object c0, Object c1, Object c2, Object c3, Object c4, Object c5) {
16         this.c0 = c0;
17         this.c1 = c1;
18         this.c2 = c2;
19         this.c3 = c3;
20         this.c4 = c4;
21         this.c5 = c5;
22     }
23
24     public int length() {
25         return 6;
26     }
27
28     public Object get(int id) {
29         switch(id) {
30         case 0: return c0;
31         case 1: return c1;
32         case 2: return c2;
33         case 3: return c3;
34         case 4: return c4;
35         case 5: return c5;
36         default: throw new IndexOutOfBoundsException();
37         }
38     }
39
40     public Object[] toArray() {
41         return new Object[] { c0, c1, c2, c3, c4, c5 };
42     }
43
44     @Override
45     public boolean equals(Object obj) {
46         if(obj == this)
47             return true;
48         if(obj == null || obj.getClass() != getClass())
49             return false;
50         Tuple6 tuple = (Tuple6)obj;
51         if(c0 == null) {
52             if(tuple.c0 != null)
53                 return false;
54         }
55         else if(!c0.equals(tuple.c0))
56             return false;
57         if(c1 == null) {
58             if(tuple.c1 != null)
59                 return false;
60         }
61         else if(!c1.equals(tuple.c1))
62             return false;
63         if(c2 == null) {
64             if(tuple.c2 != null)
65                 return false;
66         }
67         else if(!c2.equals(tuple.c2))
68             return false;
69         if(c3 == null) {
70             if(tuple.c3 != null)
71                 return false;
72         }
73         else if(!c3.equals(tuple.c3))
74             return false;
75         if(c4 == null) {
76             if(tuple.c4 != null)
77                 return false;
78         }
79         else if(!c4.equals(tuple.c4))
80             return false;
81         if(c5 == null) {
82             if(tuple.c5 != null)
83                 return false;
84         }
85         else if(!c5.equals(tuple.c5))
86             return false;
87         return true;
88     }
89
90     @Override
91     public int hashCode() {
92         int result = c0 == null ? 0 : c0.hashCode();
93         result *= 31;
94         if(c1 != null)
95             result += c1.hashCode();
96         result *= 31;
97         if(c2 != null)
98             result += c2.hashCode();
99         result *= 31;
100         if(c3 != null)
101             result += c3.hashCode();
102         result *= 31;
103         if(c4 != null)
104             result += c4.hashCode();
105         result *= 31;
106         if(c5 != null)
107             result += c5.hashCode();
108         return result;
109     }
110
111     @Override
112     public String toString() {
113         StringBuilder b = new StringBuilder();
114         b.append('(');
115         b.append(c0);
116         b.append(',');
117         b.append(c1);
118         b.append(',');
119         b.append(c2);
120         b.append(',');
121         b.append(c3);
122         b.append(',');
123         b.append(c4);
124         b.append(',');
125         b.append(c5);
126         b.append(')');
127         return b.toString();
128     }
129 }