Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

State Pattern

 
Amit Chohan
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All
I have found the need to apply a state pattern due to my class behaviour depending on state. What i am confused about is the operations and attributes that the concrete state classes contain?
Any ideas where i can get some info?
Thank You
Amit Chohan
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Portland Pattern Repository aka Wards Wiki is a good source of information on such subjects: http://c2.com/cgi/wiki?StatePattern
A google search also will bring up a bunch of resources: http://www.google.de/search?q=state+design+pattern
Besides that, there are many Ranchers waiting for you to concretize your question...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic