org.jetbrains.java.decompiler.util.Pair Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of vineflower Show documentation
Show all versions of vineflower Show documentation
Modern Java & JVM language decompiler aiming to be as accurate as possible, with an emphasis on output quality.
The newest version!
package org.jetbrains.java.decompiler.util;
import java.util.Objects;
public final class Pair {
public final A a;
public final B b;
private Pair(A a, B b) {
this.a = a;
this.b = b;
}
public static Pair of(A a, B b) {
return new Pair<>(a, b);
}
@Override
public int hashCode() {
return a.hashCode() ^ b.hashCode();
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Pair, ?> that = (Pair, ?>) o;
return Objects.equals(a, that.a) && Objects.equals(b, that.b);
}
@Override
public String toString() {
return "Pair{" + a + "," + b + '}';
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy