class ConfidenceKey {

  private final Language lang;
  private final String ruleId;

  public ConfidenceKey(Language lang, String ruleId) {
    this.lang = Objects.requireNonNull(lang);
    this.ruleId = Objects.requireNonNull(ruleId);
  }

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

  @Override
  public int hashCode() {
    return Objects.hash(lang, ruleId);
  }

  @Override
  public String toString() {
    return lang.getShortCodeWithCountryAndVariant() + "/" + ruleId;
  }
}

    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    ConfidenceKey that = (ConfidenceKey) o;
    return Objects.equals(lang, that.lang) && Objects.equals(ruleId, that.ruleId);
  
<no_super_class>