public class RemoveItemCommand<T> extends Command
| Constructor and Description |
|---|
RemoveItemCommand(Workbook workbook,
UndoableCollection<T> collection,
int index,
T item)
Initializes a new instance of the
RemoveItemCommand class. |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
execute()
Carries out an action that changes the workbook in some way.
|
protected void |
redo()
Repeats an action that has been undone.
|
protected void |
undo()
Undoes an action, restoring the workbook to the state it was in before carrying out the action.
|
getHasEffect, getWorkbookpublic RemoveItemCommand(Workbook workbook, UndoableCollection<T> collection, int index, T item)
RemoveItemCommand class.workbook - The Workbook modified by this command.collection - The collection from which the item is deleted.index - The zero-based index of the item within the collection.item - The item that should be removed from the collection.