Class UndoAction
java.lang.Object
org.aesh.readline.undo.UndoAction
Represents a single undo operation containing cursor position and buffer state.
- Author:
- Ståle W. Pedersen
-
Constructor Summary
ConstructorsConstructorDescriptionUndoAction(int cursorPosition, int[] buffer) Creates a new undo action with the specified cursor position and buffer state. -
Method Summary
Modifier and TypeMethodDescriptionint[]Returns the buffer content stored in this undo action.intReturns the cursor position stored in this undo action.
-
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 actionbuffer- 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
-