예제 #1
0
  public String toString() {
    /* s is the string representation of the SpellChecker */
    String s = "Current State of SpellChecker:";
    s += "\n\tDictionary: ";
    if (dictionary == null) {
      s += "Not Loaded";
    } else {
      s += "\n\t\t" + dictionary.toString().replace("\n", "\n\t\t");
    }

    s += "\n\tDocument: ";
    if (document == null) {
      s += "Not Loaded";
    } else {
      s += "\n\t\t" + document.toString().replace("\n", "\n\t\t");
    }

    return s;
  }