示例#1
0
  public boolean isWorks() {
    switch (workMode) {
      case WHILEREAD:
        return scn.hasNext();
      case NOTEXIT:
        return (!lastCmdLine.equals(CMD_EXIT));
        // defaul: return false;
    }

    return false;
  }
示例#2
0
  public String getNextCmd() {
    if (scn != null) lastCmdLine = scn.nextLine();

    return lastCmdLine;
  }