1 package com.github.davidmoten.rx.jdbc.tuple;
2
3
4
5
6
7
8
9
10
11
12
13 public class Tuple6<T1, T2, T3, T4, T5, T6> {
14
15 private final T1 value1;
16 private final T2 value2;
17 private final T3 value3;
18 private final T4 value4;
19 private final T5 value5;
20 private final T6 value6;
21
22
23
24
25
26
27
28
29
30
31
32 public Tuple6(T1 value1, T2 value2, T3 value3, T4 value4, T5 value5, T6 value6) {
33 this.value1 = value1;
34 this.value2 = value2;
35 this.value3 = value3;
36 this.value4 = value4;
37 this.value5 = value5;
38 this.value6 = value6;
39 }
40
41 public T1 value1() {
42 return value1;
43 }
44
45 public T2 value2() {
46 return value2;
47 }
48
49 public T3 value3() {
50 return value3;
51 }
52
53 public T4 value4() {
54 return value4;
55 }
56
57 public T5 value5() {
58 return value5;
59 }
60
61 public T6 value6() {
62 return value6;
63 }
64
65 @Override
66 public int hashCode() {
67 final int prime = 31;
68 int result = 1;
69 result = prime * result + ((value1 == null) ? 0 : value1.hashCode());
70 result = prime * result + ((value2 == null) ? 0 : value2.hashCode());
71 result = prime * result + ((value3 == null) ? 0 : value3.hashCode());
72 result = prime * result + ((value4 == null) ? 0 : value4.hashCode());
73 result = prime * result + ((value5 == null) ? 0 : value5.hashCode());
74 result = prime * result + ((value6 == null) ? 0 : value6.hashCode());
75 return result;
76 }
77
78 @Override
79 public boolean equals(Object obj) {
80 if (this == obj)
81 return true;
82 if (obj == null)
83 return false;
84 if (getClass() != obj.getClass())
85 return false;
86 Tuple6<?, ?, ?, ?, ?, ?> other = (Tuple6<?, ?, ?, ?, ?, ?>) obj;
87 if (value1 == null) {
88 if (other.value1 != null)
89 return false;
90 } else if (!value1.equals(other.value1))
91 return false;
92 if (value2 == null) {
93 if (other.value2 != null)
94 return false;
95 } else if (!value2.equals(other.value2))
96 return false;
97 if (value3 == null) {
98 if (other.value3 != null)
99 return false;
100 } else if (!value3.equals(other.value3))
101 return false;
102 if (value4 == null) {
103 if (other.value4 != null)
104 return false;
105 } else if (!value4.equals(other.value4))
106 return false;
107 if (value5 == null) {
108 if (other.value5 != null)
109 return false;
110 } else if (!value5.equals(other.value5))
111 return false;
112 if (value6 == null) {
113 if (other.value6 != null)
114 return false;
115 } else if (!value6.equals(other.value6))
116 return false;
117 return true;
118 }
119
120 @Override
121 public String toString() {
122 return "Tuple6 [value1=" + value1 + ", value2=" + value2 + ", value3=" + value3
123 + ", value4=" + value4 + ", value5=" + value5 + ", value6=" + value6 + "]";
124 }
125 }