public int hashCode() {
    int firstHashCode = (first == null ? 0 : first.hashCode());
    int secondHashCode = (second == null ? 0 : second.hashCode());
    if (firstHashCode != secondHashCode) {
      return (((firstHashCode & secondHashCode) << 16) ^ ((firstHashCode | secondHashCode)));
    } else {
      return firstHashCode;
    }
  }