class Retaggable {
  
  private String word;
  private String restrictToPos;
  private String appendTag;
  private String prefix;
  
  Retaggable(String word, String restrictToPos, String appendTag) {
    this.word = Objects.requireNonNull(word, "word must not be null");
    this.restrictToPos = restrictToPos;
    this.appendTag = appendTag;
  }
  
  Retaggable(String word, String restrictToPos, String appendTag, String prefix) {
    this(word, restrictToPos, appendTag);
    this.prefix = prefix;
  }

  void setAppendTag(String appendTag) {<FILL_FUNCTION_BODY>}

  void setRestrictToPos(String restrictToPos) {
    if(this.restrictToPos == null || "".equals(this.restrictToPos)) {
      this.restrictToPos = restrictToPos;
    } else {
      this.restrictToPos = this.restrictToPos + "|" + restrictToPos;
    }
  }

  public String getWord() {
    return word;
  }
  public String getRestrictToPos() {
    return restrictToPos;
  }
  public String getAppendTag() {
    return appendTag;
  }
  String getPrefix() {
    return prefix;
  }
}

    if(this.appendTag == null || "".equals(this.appendTag)) {
      this.appendTag = appendTag;
    } else {
      this.appendTag = this.appendTag + appendTag;
    }
  
<no_super_class>