/** * Sets mode of the gazetteer list * * @param m the mode to be set */ public void setMode(int m) { if(m != mode) { switch(m) { case LIST_MODE: { mode = m; updateContent(content); break; } // LIST_MODE case STRING_MODE: { content = this.toString(); mode = m; break; } // STRING_MODE default: { throw new gate.util.GateRuntimeException("Invalid Mode =" + mode + "\nValid modes are:\nLIST_MODE = " + LIST_MODE + "\nSTRING_MODE = " + STRING_MODE); } // default } // switch } // only if different from the current } // setMode(int)