2 * This code is generated in org.simantics.scl.runtime.generation.GenerateTuples.
3 * Do not edit manually!
5 package org.simantics.scl.runtime.tuple;
7 public class Tuple2 implements Tuple {
8 public final Object c0;
9 public final Object c1;
11 public Tuple2(Object c0, Object c1) {
20 public Object get(int id) {
24 default: throw new IndexOutOfBoundsException();
28 public Object[] toArray() {
29 return new Object[] { c0, c1 };
33 public boolean equals(Object obj) {
36 if(obj == null || obj.getClass() != getClass())
38 Tuple2 tuple = (Tuple2)obj;
43 else if(!c0.equals(tuple.c0))
49 else if(!c1.equals(tuple.c1))
55 public int hashCode() {
56 int result = c0 == null ? 0 : c0.hashCode();
59 result += c1.hashCode();
64 public String toString() {
65 StringBuilder b = new StringBuilder();