public boolean equals(Object o) { if (this == o) return true; else if (o == null || !o.getClass().equals(Pair.class)) return false; else { final Pair<Object, Object> that = (Pair<Object, Object>) o; if (first != null ? !first.equals(that.first) : that.first != null) return false; else return !(second != null ? !second.equals(that.second) : that.second != null); } }
public int hashCode() { int result; result = (first != null ? first.hashCode() : -1); result = 73 * result + (second != null ? second.hashCode() : -1); return result; }