【JAVA設計模式】18.備忘錄模式

顧名思義,備忘錄模式用於當信息發生改變時回溯回之前存在的某一個版本。 UML圖: 備忘錄類Memento,提供修改和獲得內部信息的方法: class Memento { private String state; public Memento(String state) { this.state = state; } public String
相關文章
相關標籤/搜索