예제 #1
0
 @Override
 public void undo() {
   commandMemento.undo();
 }
예제 #2
0
 @Override
 public void remove(String id) {
   User remove = registry.remove(id);
   notifyDel(remove);
   commandMemento.setUndoCommand(new AddCommand(new AddCommandArgumentsValidator(remove)));
 }
예제 #3
0
 @Override
 public void put(User user) {
   registry.put(user.getId(), user);
   notifyAdd(user);
   commandMemento.setUndoCommand(new DelCommand(user.getId()));
 }