Class ArrayListHistory
java.lang.Object
com.sk89q.worldedit.history.changeset.ArrayListHistory
- All Implemented Interfaces:
ChangeSet
- Direct Known Subclasses:
BlockOptimizedHistory
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add the given change to the history.Get a backward directed iterator that can be used for undo.Get a forward directed iterator that can be used for redo.boolean
Whether or not the ChangeSet is recording changes.void
setRecordChanges
(boolean recordChanges) Tell the change set whether to record changes or not.int
size()
Get the number of stored changes.
-
Constructor Details
-
ArrayListHistory
public ArrayListHistory()
-
-
Method Details
-
add
Description copied from interface:ChangeSet
Add the given change to the history. -
isRecordingChanges
public boolean isRecordingChanges()Description copied from interface:ChangeSet
Whether or not the ChangeSet is recording changes.- Specified by:
isRecordingChanges
in interfaceChangeSet
- Returns:
- whether or not the ChangeSet is set to record changes
-
setRecordChanges
public void setRecordChanges(boolean recordChanges) Description copied from interface:ChangeSet
Tell the change set whether to record changes or not.- Specified by:
setRecordChanges
in interfaceChangeSet
- Parameters:
recordChanges
- whether to record changes or not
-
backwardIterator
Description copied from interface:ChangeSet
Get a backward directed iterator that can be used for undo.The iterator may return the changes out of order, as long as the final result after all changes have been applied is correct.
- Specified by:
backwardIterator
in interfaceChangeSet
- Returns:
- a undo directed iterator
-
forwardIterator
Description copied from interface:ChangeSet
Get a forward directed iterator that can be used for redo.The iterator may return the changes out of order, as long as the final result after all changes have been applied is correct.
- Specified by:
forwardIterator
in interfaceChangeSet
- Returns:
- a forward directed iterator
-
size
public int size()Description copied from interface:ChangeSet
Get the number of stored changes.
-