mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-10-15 10:15:00 +00:00
Improve State Javadoc
This commit is contained in:
1 parent
74e32259be
commit
2234a25c76
1 file changed
+5
-1
@@ -2,10 +2,14 @@ package com.iluwatar.state;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* In State pattern the container object ({@link Mammoth}) has an internal state object ({@link State}) that
|
* In State pattern the container object has an internal state object that
|
||||||
* defines the current behavior. The state object can be changed to alter the
|
* defines the current behavior. The state object can be changed to alter the
|
||||||
* behavior.
|
* behavior.
|
||||||
* <p>
|
* <p>
|
||||||
|
* This can be a cleaner way for an object to change its behavior at runtime
|
||||||
|
* without resorting to large monolithic conditional statements and thus improves
|
||||||
|
* maintainability.
|
||||||
|
* <p>
|
||||||
* In this example the {@link Mammoth} changes its behavior as time passes by.
|
* In this example the {@link Mammoth} changes its behavior as time passes by.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in new issue
Block a user