20 package net.sf.gridarta.model.undo;
26 import org.jetbrains.annotations.NotNull;
27 import org.jetbrains.annotations.Nullable;
61 public UndoState(@NotNull
final String name, @NotNull
final A mapArchObject) {
81 @SuppressWarnings(
"NullableProblems")
83 if (this.savedSquares != null) {
84 throw new IllegalStateException();
96 @SuppressWarnings(
"NullableProblems")
99 throw new IllegalStateException();
final A mapArchObject
The map arch object before the operation started.
void setSavedSquares(@NotNull final SavedSquares< G, A, R > savedSquares)
Records the affected map squares.
SavedSquares< G, A, R > getSavedSquares()
Returns the map squares that have changed in the operation.
String getName()
Return the name of the operation.
Holds information to undo/redo one edit operation.
final String name
The name of the operation.
UndoState(@NotNull final String name, @NotNull final A mapArchObject)
Create a new instance.
Base package of all Gridarta classes.
Reflects a game object (object on a map).
GameObjects are the objects based on Archetypes found on maps.
Records a set of changed map squares.
A getMapArchObject()
Returns the map arch object before the operation started.
Interface for MapArchObjects.
SavedSquares< G, A, R > savedSquares
The affected map squares.