/** Invoke stopTask on the wrapper and indicate whether this was the first * time the task has been notified to stop. * @return true if this is the first stopTask, false on the second. */ public boolean stopTask() { wrapper.stopTask(); boolean wasFirstStop = firstStop == false; firstStop = true; return wasFirstStop; } }