io.annot8.common.data.tuple.Tuple3 Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of annot8-common-data Show documentation
Show all versions of annot8-common-data Show documentation
Common data (bounds and content) definitions
The newest version!
/* Annot8 (annot8.io) - Licensed under Apache-2.0. */
package io.annot8.common.data.tuple;
import java.util.Objects;
public class Tuple3 implements Tuple {
private final A a;
private final B b;
private final C c;
public Tuple3(A a, B b, C c) {
this.a = a;
this.b = b;
this.c = c;
}
public A getA() {
return a;
}
public B getB() {
return b;
}
public C getC() {
return c;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Tuple3, ?, ?> tuple3 = (Tuple3, ?, ?>) o;
return Objects.equals(a, tuple3.a)
&& Objects.equals(b, tuple3.b)
&& Objects.equals(c, tuple3.c);
}
@Override
public int hashCode() {
return Objects.hash(a, b, c);
}
@Override
public String toString() {
return String.format("(%s, %s, %s)", a, b, c);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy