MCPcopy Index your code
hub / github.com/LFDT-web3j/web3j / Tuple2

Class Tuple2

tuples/src/main/java/org/web3j/tuples/generated/Tuple2.java:11–83  ·  view source on GitHub ↗

Auto generated code. Do not modifiy! Please use org.web3j.codegen.TupleGenerator in the codegen module to update.

Source from the content-addressed store, hash-verified

9 * <a href="https://github.com/hyperledger/web3j/tree/main/codegen">codegen module</a> to update.
10 */
11public final class Tuple2<T1, T2> implements Tuple {
12 private static final int SIZE = 2;
13
14 private final T1 value1;
15
16 private final T2 value2;
17
18 public Tuple2(T1 value1, T2 value2) {
19 this.value1 = value1;
20 this.value2 = value2;
21 }
22
23 /**
24 * @deprecated use 'component1' method instead
25 * @return the return value
26 * */
27 @Deprecated
28 public T1 getValue1() {
29 return value1;
30 }
31
32 public T1 component1() {
33 return value1;
34 }
35
36 /**
37 * @deprecated use 'component2' method instead
38 * @return the return value
39 * */
40 @Deprecated
41 public T2 getValue2() {
42 return value2;
43 }
44
45 public T2 component2() {
46 return value2;
47 }
48
49 @Override
50 public int getSize() {
51 return SIZE;
52 }
53
54 @Override
55 public boolean equals(Object o) {
56 if (this == o) {
57 return true;
58 }
59 if (o == null || getClass() != o.getClass()) {
60 return false;
61 }
62 Tuple2<?, ?> tuple2 = (Tuple2<?, ?>) o;
63 if (value1 != null ? !value1.equals(tuple2.value1) : tuple2.value1 != null) {
64 return false;
65 }
66 return value2 != null ? value2.equals(tuple2.value2) : tuple2.value2 == null;
67 }
68

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected