Class DeleteStartOfLine

java.lang.Object
org.aesh.readline.action.mappings.DeleteStartOfLine
All Implemented Interfaces:
Consumer<InputProcessor>, Action

public class DeleteStartOfLine extends Object
Action that deletes text from cursor to beginning of line.
Author:
Ståle W. Pedersen
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected boolean
    Whether this action operates in vi mode.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new DeleteStartOfLine action.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    accept(InputProcessor inputProcessor)
    Executes this action on the given input processor.
    protected final void
    apply(int cursor, int oldCursor, InputProcessor inputProcessor)
    Apply the change action between two cursor positions.
    protected final void
    apply(int cursor, InputProcessor inputProcessor)
    Apply the change action from the current cursor position.
    protected EditMode.Status
    Get the edit mode status.
    protected boolean
    isDelimiter(char c)
    Check if the character is a delimiter (non-alphanumeric).
    protected boolean
    isSpace(char c)
    Check if the character is a whitespace.
    Returns the name of this action.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface Consumer

    andThen
  • Field Details

    • viMode

      protected boolean viMode
      Whether this action operates in vi mode.
  • Constructor Details

    • DeleteStartOfLine

      public DeleteStartOfLine()
      Creates a new DeleteStartOfLine action.
  • Method Details

    • name

      public String name()
      Description copied from interface: Action
      Returns the name of this action.
      Returns:
      the action name
    • accept

      public void accept(InputProcessor inputProcessor)
      Description copied from interface: Action
      Executes this action on the given input processor.
      Parameters:
      inputProcessor - the input processor to operate on
    • getStatus

      protected EditMode.Status getStatus()
      Get the edit mode status.
      Returns:
      the status
    • apply

      protected final void apply(int cursor, InputProcessor inputProcessor)
      Apply the change action from the current cursor position.
      Parameters:
      cursor - the target cursor position
      inputProcessor - the input processor
    • apply

      protected final void apply(int cursor, int oldCursor, InputProcessor inputProcessor)
      Apply the change action between two cursor positions.
      Parameters:
      cursor - the target cursor position
      oldCursor - the original cursor position
      inputProcessor - the input processor
    • isSpace

      protected boolean isSpace(char c)
      Check if the character is a whitespace.
      Parameters:
      c - the character to check
      Returns:
      true if the character is whitespace
    • isDelimiter

      protected boolean isDelimiter(char c)
      Check if the character is a delimiter (non-alphanumeric).
      Parameters:
      c - the character to check
      Returns:
      true if the character is a delimiter