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 Command<CTX,RET,E>
Modifier and Type | Method and Description |
---|---|
boolean |
isUndoable(CTX aContext)
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(CTX aContext)
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(Object)
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 © 2017. All rights reserved.