class DumontsHunspellDictionary implements HunspellDictionary {
  private final Hunspell hunspell;
  private boolean closed = false;

  public DumontsHunspellDictionary(Path dictionary, Path affix) {
    try {
      hunspell = new Hunspell(dictionary,affix);
    } catch (UnsatisfiedLinkError e) {
      throw new RuntimeException("Could not create hunspell instance. Please note that LanguageTool supports only 64-bit platforms " +
          "(Linux, Windows, Mac) and that it requires a 64-bit JVM (Java).", e);
    }
  }

  @Override
  public boolean spell(String word) {
    if (closed) {
      throw new RuntimeException("Attempt to use hunspell instance after closing");
    }
    return hunspell.spell(word);
  }

  @Override
  public void add(String word) {<FILL_FUNCTION_BODY>}

  @Override
  public List<String> suggest(String word) {
    if (closed) {
      throw new RuntimeException("Attempt to use hunspell instance after closing");
    }
    return Arrays.asList(hunspell.suggest(word));
  }

  @Override
  public boolean isClosed() {
    return closed;
  }

  @Override
  public void close() throws IOException {
    closed = true;
    hunspell.close();
  }
}

    if (closed) {
      throw new RuntimeException("Attempt to use hunspell instance after closing");
    }
    hunspell.add(word);
  
<no_super_class>