
com.sap.cds.impl.util.Pair Maven / Gradle / Ivy
package com.sap.cds.impl.util;
import java.util.Objects;
public class Pair {
public final L left;
public final R right;
public Pair(L left, R right) {
this.left = left;
this.right = right;
}
public boolean equals(Object other) {
return
other instanceof Pair,?> &&
Objects.equals(left, ((Pair,?>)other).left) &&
Objects.equals(right, ((Pair,?>)other).right);
}
public int hashCode() {
return Objects.hash(left, right);
}
public static Pair of(L left, R right) {
return new Pair<>(left,right);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy