class RuleWithLanguage {

  private final Rule rule;
  private final Language language;
  
  public RuleWithLanguage(Rule rule, Language language) {
    this.rule = Objects.requireNonNull(rule);
    this.language = Objects.requireNonNull(language);
  }

  public Language getLanguage() {
    return language;
  }

  public Rule getRule() {
    return rule;
  }

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

  @Override
  public int hashCode() {
    return Objects.hash(rule, language);
  }
}

    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    RuleWithLanguage that = (RuleWithLanguage) o;
    return Objects.equals(rule, that.rule) && Objects.equals(language, that.language);
  
<no_super_class>