Advertisement
Guest User

Untitled

a guest
Aug 29th, 2014
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. public enum LinkStates implements StuffDoneListener {
  2.  
  3. ...
  4.  
  5. DO_SOME_WORK {
  6. public void process() {
  7. ....
  8. ....
  9. someObject.startDoingSpecialStuff();
  10. outerClass.toState(WAIT_FOR_EVENT);
  11. }
  12. },
  13.  
  14.  
  15. WAIT_FOR_EVENT {
  16. public void process() {
  17. // does nothing
  18. }
  19.  
  20. public void onSpecialStuffComplete() {
  21.  
  22. }
  23. }
  24.  
  25. ...
  26.  
  27. // Default implementation of interface methods which individual states
  28. // may override at will
  29. public void onSpecialStuffComplete() {
  30. }
  31.  
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement