Class UndoAction

java.lang.Object
org.aesh.readline.undo.UndoAction

public class UndoAction extends Object
Represents a single undo operation containing cursor position and buffer state.
Author:
Ståle W. Pedersen
  • Constructor Summary

    Constructors
    Constructor
    Description
    UndoAction(int cursorPosition, int[] buffer)
    Creates a new undo action with the specified cursor position and buffer state.
  • Method Summary

    Modifier and Type
    Method
    Description
    int[]
    Returns the buffer content stored in this undo action.
    int
    Returns the cursor position stored in this undo action.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • UndoAction

      public UndoAction(int cursorPosition, int[] buffer)
      Creates a new undo action with the specified cursor position and buffer state.
      Parameters:
      cursorPosition - the cursor position at the time of the action
      buffer - the buffer content at the time of the action
  • Method Details

    • getCursorPosition

      public int getCursorPosition()
      Returns the cursor position stored in this undo action.
      Returns:
      the cursor position
    • getBuffer

      public int[] getBuffer()
      Returns the buffer content stored in this undo action.
      Returns:
      the buffer content as code points