@Override
  public boolean equals(Object other) {
    if (other == null) {
      return false;
    }

    if (!(other instanceof Pair)) {
      return false;
    }

    Pair otherPair = (Pair) other;

    if (this.first == null) {
      if (otherPair.first != null) {
        return false;
      } else {
        return true;
      }
    }

    if (this.second == null) {
      if (otherPair.second != null) {
        return false;
      } else {
        return true;
      }
    }

    if (this.first.equals(otherPair.first) && this.second.equals(otherPair.second)) {
      return true;
    } else {
      return false;
    }
  }
@param f First element in pair.
@param s Second element in pair.
hcatalog/core/src/main/java/org/apache/hive/hcatalog/data/Pair.java