在软件的构建过程中,某些对象的状态在转换的过程中,可能由于某种的需要,要求程序能够回溯到以前的状态。

Without violating encapsulation, capture and externalize an object's internal state so that the object can be restored to this state later. 仅仅是在外部新增加一个类,然后在这个类中保存类的状态信息。

实现代码:

相关文章:

  • 2021-11-10
  • 2022-01-27
  • 2021-09-14
  • 2022-01-14
  • 2021-07-11
  • 2021-10-14
  • 2021-10-02
猜你喜欢
  • 2021-07-16
  • 2021-06-23
  • 2021-07-13
  • 2022-12-23
  • 2022-03-01
  • 2022-02-11
  • 2021-05-27
相关资源
相似解决方案