public void handleTransitions() { if (currentTask.isDone()) { currentTask.doTransitionOutOfAction(); if (!taskQueue.isEmpty()) { currentTask = taskQueue.poll(); if (printDebugStatements) System.out.println("+++ " + getClass().getSimpleName() + ": transitioning into new task:\n" + currentTask.toString()); } else { currentTask = nullTask; } currentTask.doTransitionIntoAction(); } }
public void handleTransitions() { if (currentTask.isDone()) { currentTask.doTransitionOutOfAction(); if (!taskQueue.isEmpty()) { currentTask = taskQueue.poll(); if (printDebugStatements) System.out.println("+++ " + getClass().getSimpleName() + ": transitioning into new task:\n" + currentTask.toString()); } else { currentTask = nullTask; } currentTask.doTransitionIntoAction(); } }