CTX - The context type to use, can by any Component, service
or POJO.RET - The return type of the Undoable's proceedings.E - The exception type of the Undoable's erroneous
termination.public interface Undoable<CTX,RET,E extends Exception> extends org.refcodes.component.mixins.Resetable, Command<CTX,RET,E>
| Modifier and Type | Method and Description |
|---|---|
boolean |
isUndoable()
This method determines whether the
Undoable can undo the
work it has done. |
void |
undo(CTX aContext)
This method tries to undo the
Undoable in case it was
successfully executed. |
boolean isUndoable()
Undoable can undo the
work it has done.void undo(CTX aContext) throws NotUndoableRuntimeException, UnsupportedOperationException
Undoable in case it was
successfully executed. Test via isUndoable() beforehand to see
whether a call to undo(Object) can be applied.aContext - The target object which is used by the
Undoable to do its Undoable.NotUndoableRuntimeException - Thrown in case the performed
operation cannot be undone, or no operation as been done before
by this Undoable.UnsupportedOperationException - Thrown in case the
Undoable does not provide undo facilities.Copyright © 2015. All rights reserved.