Class UpCaseForwardWord

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

public class UpCaseForwardWord extends Object
Action that converts the next word to uppercase.
Author:
Ståle W. Pedersen
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new UpCaseForwardWord action with emacs mode.
    UpCaseForwardWord(boolean viMode)
    Creates a new UpCaseForwardWord action with the specified vi mode setting.
  • 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 java.lang.Object

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

    Methods inherited from interface java.util.function.Consumer

    andThen
  • Constructor Details

    • UpCaseForwardWord

      public UpCaseForwardWord()
      Creates a new UpCaseForwardWord action with emacs mode.
    • UpCaseForwardWord

      public UpCaseForwardWord(boolean viMode)
      Creates a new UpCaseForwardWord action with the specified vi mode setting.
      Parameters:
      viMode - true to enable vi mode, false for emacs mode
  • 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