my dog learned polymorphism*
The moose likes OO, Patterns, UML and Refactoring and the fly likes State Pattern Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "State Pattern" Watch "State Pattern" New topic

State Pattern

Amit Chohan

Joined: Oct 31, 2002
Posts: 29
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

Java Junior<br />Leicester<br />England
Ilja Preuss

Joined: Jul 11, 2001
Posts: 14112
The Portland Pattern Repository aka Wards Wiki is a good source of information on such subjects:
A google search also will bring up a bunch of resources:
Besides that, there are many Ranchers waiting for you to concretize your question...

The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
jQuery in Action, 2nd edition
subject: State Pattern
Similar Threads
Data class multithreaded load test (UB1.1.2)
what design Pattern to use for this problem
About Patterns and Their codes
subclasses and access modifiers
any article about state, strategy and vistor pattern?