com.clickzetta.platform.util.Pair Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of clickzetta-java Show documentation
Show all versions of clickzetta-java Show documentation
The java SDK for clickzetta's Lakehouse
package com.clickzetta.platform.util;
import com.google.common.base.Objects;
import java.io.Serializable;
public class Pair implements Serializable {
private final A first;
private final B second;
public Pair(A first, B second) {
this.first = first;
this.second = second;
}
public A getFirst() {
return first;
}
public B getSecond() {
return second;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof Pair)) {
return false;
}
Pair, ?> pair = (Pair, ?>) o;
if (first != null ? !first.equals(pair.first) : pair.first != null) {
return false;
}
if (second != null ? !second.equals(pair.second) : pair.second != null) {
return false;
}
return true;
}
@Override
public int hashCode() {
return Objects.hashCode(first, second);
}
@Override
public String toString() {
return "Pair{" +
"first=" + first +
", second=" + second +
'}';
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy