Class CommandHistory
java.lang.Object
com.realtime.crossfire.jxclient.settings.CommandHistory
Manages a list of previously entered commands.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
CommandHistory
Creates a new instance.- Parameters:
ident- the identification string for backing up to file
-
-
Method Details
-
addCommand
Adds a new command.- Parameters:
command- the command to add
-
up
Returns the previous command.- Returns:
- the previous command or
nullif no previous command exists
-
down
Returns the next command.- Returns:
- the next command or
nullif no previous command exists
-
last
Returns the last executed command.- Parameters:
index- the index of the command; 0=last command, 1=second to last, etc.- Returns:
- the last executed command or
nullif the index is invalid
-