org.github.codefarmer.spring.promises.Tuple2 Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spring-promises Show documentation
Show all versions of spring-promises Show documentation
Glue code allowing Spring Futures to be mapped, flatMapped, joined and other convenient things.
package org.github.codefarmer.spring.promises;
/**
* Created by joelgluth on 20/01/2015.
*/
public class Tuple2 {
final A a;
final B b;
public Tuple2(A a, B b) {
this.a = a;
this.b = b;
}
public A _1() {
return a;
}
public B _2() {
return b;
}
// generated by IntelliJ
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Tuple2 tuple2 = (Tuple2) o;
if (a != null ? !a.equals(tuple2.a) : tuple2.a != null) {
return false;
}
if (b != null ? !b.equals(tuple2.b) : tuple2.b != null) {
return false;
}
return true;
}
// generated by IntelliJ
@Override
public int hashCode() {
int result = a != null ? a.hashCode() : 0;
result = 31 * result + (b != null ? b.hashCode() : 0);
return result;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy