class LevelToneTagCacheKey {

  private final JLanguageTool.Level level;
  private final Set<ToneTag> toneTags;

  public LevelToneTagCacheKey(@NotNull JLanguageTool.Level level, @NotNull Set<ToneTag> toneTags) {
    this.level = level;
    this.toneTags = new TreeSet<>(toneTags); //sorted by default
  }

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

  @Override
  public int hashCode() {
    int result = getLevel().hashCode();
    result = 31 * result + getToneTags().hashCode();
    return result;
  }
}

    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;

    LevelToneTagCacheKey that = (LevelToneTagCacheKey) o;

    if (getLevel() != that.getLevel()) return false;
    if (!getToneTags().equals(that.getToneTags())) return false;

    return true;
  
<no_super_class>