Improved comments for state pattern.

This commit is contained in:
Ilkka Seppala committed 2015-01-08 20:30:10 +02:00
1 parent 742f8376b3
commit 27a27594f4
3 files changed
+13 -1

No files matched your search

@@ -1,5 +1,10 @@
package com.iluwatar;
/**
*
* Angry state.
*
*/
public class AngryState implements State {
private Mammoth mammoth;
+3 -1
View File
@@ -2,10 +2,12 @@ package com.iluwatar;
/**
*
* In State pattern the object (Mammoth) has internal state object (State) that
* In State pattern the container object (Mammoth) has an internal state object (State) that
* defines the current behavior. The state object can be changed to alter the
* behavior.
*
* In this example the mammoth changes its behavior as time passes by.
*
*/
public class App {
@@ -1,5 +1,10 @@
package com.iluwatar;
/**
*
* Peaceful state.
*
*/
public class PeacefulState implements State {
private Mammoth mammoth;