package eu.geoknow.generator.utils;
public class ObjectPair<F, S> {
private F first;
private S second;
public ObjectPair(F first, S second) {
this.first = first;
this.second = second;
}
public F getFirst() {
return first;
}
public void setFirst(F first) {
this.first = first;
}
public S getSecond() {
return second;
}
public void setSecond(S second) {
this.second = second;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
ObjectPair that = (ObjectPair) o;
if (first != null ? !first.equals(that.first) : that.first != null) return false;
if (second != null ? !second.equals(that.second) : that.second != null) return false;
return true;
}
@Override
public int hashCode() {
int result = first != null ? first.hashCode() : 0;
result = 31 * result + (second != null ? second.hashCode() : 0);
return result;
}
}