Пример #1
0
 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);
   }
 }