static final int HISTORY_SIZE
The maximum number of commands to store.
final List< String > commands
The commands.
String up()
Returns the previous command.
CommandHistory(@NotNull final String ident)
Creates a new instance.
void removeCommand(@NotNull final String command)
Removes a command.
String last(final int index)
Returns the last executed command.
String down()
Returns the next command.
void trimToMaxSize()
Cut off old entries if more than HISTORY_SIZE commands are present.
void addCommand(@NotNull final String command)
Adds a new command.
int commandIndex
The current command index.
Manages a list of previously entered commands.