()
| 54 | ).iterator(); |
| 55 | Washer() { runAll(); } |
| 56 | @Override public boolean changeState() { |
| 57 | if(!states.hasNext()) |
| 58 | return false; |
| 59 | // Set the surrogate reference |
| 60 | // to a new State object: |
| 61 | currentState = states.next(); |
| 62 | return true; |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | public class StateMachineDemo { |