Search code examples
javalistundo-redo

the undo and redo implementation in Java


I want to ask a question about List in Java.

It is easy to implement delete,add and search an element in a list. But how to implement the undo and redo of a list in Java?

can anyone help me on this?


Solution

  • You might be looking to implement a Command Design Pattern for this. A decent simplified example for List can be found here http://www.algosome.com/articles/implementing-undo-redo-java.html