@Override
  public boolean equals(final Object obj) {
    if (!(obj instanceof Pair)) {
      return false;
    }

    final Pair<?, ?> p = (Pair<?, ?>) obj;

    return (((p.first != null) && p.first.equals(first)) || ((p.first == null) && (first == null)))
        && (((p.second != null) && p.second.equals(second))
            || ((p.second == null) && (second == null)));
  }
Creates a new pair.

@param first The first element of the pair.
@param second The second element of the pair.
java/zylib/src/main/java/com/google/security/zynamics/zylib/general/Pair.java