Improved comments for state pattern.

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

View File

@ -1,5 +1,10 @@
package com.iluwatar;
/**
*
* Angry state.
*
*/
public class AngryState implements State {
private Mammoth mammoth;

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 {

View File

@ -1,5 +1,10 @@
package com.iluwatar;
/**
*
* Peaceful state.
*
*/
public class PeacefulState implements State {
private Mammoth mammoth;