CSDN博客

img wangjiong

Memento

发表于2004/9/14 14:59:00  538人阅读

分类: Design Patterns

Benefits:
• It preserves encapsulation boundaries.
• It simplifies the originator.

Applicable Scenarios:
• A snapshot containing enough information regarding the state of an object can be saved so that it can be restored to the complete state using the snapshot information later.
• Using a direct interface to obtain the state would impose implementation details that would break the rules of encapsulation for the object.

0 0

相关博文

我的热门文章

img
取 消
img