class IndexedDiff {
  public final Object actual;
  public final Object expected;
  public final int index;

  /**
   * Create a {@link IndexedDiff}.
   * @param actual the actual value of the diff.
   * @param expected the expected value of the diff.
   * @param index the index the diff occurred at.
   */
  public IndexedDiff(Object actual, Object expected, int index) {
    this.actual = actual;
    this.expected = expected;
    this.index = index;
  }

  @Override
  public boolean equals(Object o) {<FILL_FUNCTION_BODY>}

  @Override
  public String toString() {
    return String.format("IndexedDiff(actual=%s, expected=%s, index=%s)", this.actual, this.expected, this.index);
  }

  @Override
  public int hashCode() {
    return Objects.hash(actual, expected, index);
  }

}

    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    IndexedDiff that = (IndexedDiff) o;
    return index == that.index && Objects.equals(actual, that.actual) && Objects.equals(expected, that.expected);
  
<no_super_class>