CSDN博客

img wangjiong

State

发表于2004/9/15 18:45:00  555人阅读

Benefits:
• It keeps state-specific behavior local and partitions behavior for different states.
• It makes any state transitions explicit.

Applicable Scenarios:
• The behavior of an object depends on its state and it must be able to change its behavior at runtime according on the new state.
• Operations have large, multipart conditional statements that depend on the state of the object.

0 0

相关博文

我的热门文章

img
取 消
img