@Override
  public boolean equals(Object other) {
    if (this == other) return true;
    if (other == null || getClass() != other.getClass()) return false;

    Pair tuple2 = (Pair) other;

    return Objects.equals(first, tuple2.first) && Objects.equals(second, tuple2.second);
  }
An immutable pair of elements.

@author Peter Niederwieser
spock-core/src/main/java/org/spockframework/util/Pair.java