Class EngineMemento

java.lang.Object
fr.istic.aco.editor.memento.EngineMemento
All Implemented Interfaces:
Memento

public class EngineMemento extends Object implements Memento
Memento to save the states of the engine.
  • Constructor Details

    • EngineMemento

      public EngineMemento(String bufferContent, int beginIndex, int endIndex, String clipboard)
  • Method Details

    • getBufferContent

      public String getBufferContent()
      Retrieves the current content of the engine memento's buffer.
      Returns:
      the content of the buffer as a String.
    • setBufferContent

      public void setBufferContent(String bufferContent)
      Updates the content of the engine memento's buffer.
      Parameters:
      bufferContent - the new content to set in the buffer.
    • getBeginIndex

      public int getBeginIndex()
      Retrieves the starting index of the engine memento
      Returns:
      the beginning index as an int
    • setBeginIndex

      public void setBeginIndex(int beginIndex)
      Sets the starting index of the engine memento
      Parameters:
      beginIndex - the new beginning index as an int
    • getEndIndex

      public int getEndIndex()
      Retrieves the ending index of the engine memento
      Returns:
      the ending index as an int
    • setEndIndex

      public void setEndIndex(int endIndex)
      Sets the ending index of the engine memento
      Parameters:
      endIndex - the new ending index as an int
    • getClipboard

      public String getClipboard()
      Retrieves the content currently stored in the engine memento's clipboard.
      Returns:
      the clipboard content as a String.
    • setClipboard

      public void setClipboard(String clipboard)
      Updates the content of the engine memento's clipboard.
      Parameters:
      clipboard - the new content to set in the clipboard.