Class UndoActions


  • public class UndoActions
    extends java.lang.Object
    Utility class implementing undo and redo actions.
    • Method Detail

      • undo

        public static <G extends GameObject<G,​A,​R>,​A extends MapArchObject<A>,​R extends Archetype<G,​A,​R>> void undo​(@NotNull
                                                                                                                                                        @NotNull UndoModel<G,​A,​R> undoModel,
                                                                                                                                                        @NotNull
                                                                                                                                                        @NotNull MapModel<G,​A,​R> mapModel)
        Perform an "undo" action on a MapModel.
        Parameters:
        undoModel - the state to undo
        mapModel - the map model to affect
      • redo

        public static <G extends GameObject<G,​A,​R>,​A extends MapArchObject<A>,​R extends Archetype<G,​A,​R>> void redo​(@NotNull
                                                                                                                                                        @NotNull UndoModel<G,​A,​R> undoModel,
                                                                                                                                                        @NotNull
                                                                                                                                                        @NotNull MapModel<G,​A,​R> mapModel)
        Perform a "redo" action on a MapModel.
        Parameters:
        undoModel - the state to redo
        mapModel - the map model to affect