public boolean isWorks() { switch (workMode) { case WHILEREAD: return scn.hasNext(); case NOTEXIT: return (!lastCmdLine.equals(CMD_EXIT)); // defaul: return false; } return false; }
public String getNextCmd() { if (scn != null) lastCmdLine = scn.nextLine(); return lastCmdLine; }