Memento Design Pattern

Derek Banas
Derek Banas
103.2 هزار بار بازدید - 12 سال پیش - Get the Copy and Paste
Get the Copy and Paste Code: http://goo.gl/rzW5i

Welcome to my Memento Design Pattern Tutorial! The Memento design pattern provides a way to store previous states of an Object easily.

It has 3 main classes:

1. Memento: The basic object that is stored in different states.

2. Originator: Sets and Gets values from the currently targeted Memento. Creates new Mementos and assigns current values to them.

3. Caretaker: Holds an ArrayList that contains all previous versions of the Memento. It can store and retrieve stored Mementos.

All of the code is above to help you learn.
12 سال پیش در تاریخ 1391/08/09 منتشر شده است.
103,234 بـار بازدید شده
... بیشتر