1// Copyright (c) Facebook, Inc. and its affiliates
2// SPDX-License-Identifier: MIT OR Apache-2.0
6import java.util.Objects;
8public final class Tuple2<T0, T1> {
9 public final T0 field0;
10 public final T1 field1;
12 public Tuple2(T0 f0, T1 f1) {
13 Objects.requireNonNull(f0, "f0 must not be null");
14 Objects.requireNonNull(f1, "f1 must not be null");
19 public boolean equals(Object obj) {
20 if (this == obj) return true;
21 if (obj == null) return false;
22 if (getClass() != obj.getClass()) return false;
23 Tuple2<?,?> other = (Tuple2) obj;
24 if (!Objects.equals(this.field0, other.field0)) {
27 if (!Objects.equals(this.field1, other.field1)) {
33 public int hashCode() {
35 value = 31 * value + (this.field0 != null ? this.field0.hashCode() : 0);
36 value = 31 * value + (this.field1 != null ? this.field1.hashCode() : 0);
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list