class ExpandedPair {

  private final DataCharacter leftChar;
  private final DataCharacter rightChar;
  private final FinderPattern finderPattern;

  ExpandedPair(DataCharacter leftChar,
               DataCharacter rightChar,
               FinderPattern finderPattern) {
    this.leftChar = leftChar;
    this.rightChar = rightChar;
    this.finderPattern = finderPattern;
  }

  DataCharacter getLeftChar() {
    return this.leftChar;
  }

  DataCharacter getRightChar() {
    return this.rightChar;
  }

  FinderPattern getFinderPattern() {
    return this.finderPattern;
  }

  boolean mustBeLast() {
    return this.rightChar == null;
  }

  @Override
  public String toString() {<FILL_FUNCTION_BODY>}

  @Override
  public boolean equals(Object o) {
    if (!(o instanceof ExpandedPair)) {
      return false;
    }
    ExpandedPair that = (ExpandedPair) o;
    return Objects.equals(leftChar, that.leftChar) &&
        Objects.equals(rightChar, that.rightChar) &&
        Objects.equals(finderPattern, that.finderPattern);
  }

  @Override
  public int hashCode() {
    return Objects.hashCode(leftChar) ^ Objects.hashCode(rightChar) ^ Objects.hashCode(finderPattern);
  }

}

    return
        "[ " + leftChar + " , " + rightChar + " : " +
        (finderPattern == null ? "null" : finderPattern.getValue()) + " ]";
  
<no_super_class>