public class CommandHistory
extends java.lang.Object
Constructor and Description |
---|
CommandHistory()
Creates a CommandHistory with the default capacity of 64
|
CommandHistory(int capacity)
Creates a CommandHistory with a specified capacity
|
Modifier and Type | Method and Description |
---|---|
void |
add(java.lang.String command)
Adds a command to this command history manager.
|
int |
getCapacity() |
int |
getLength() |
java.lang.String |
getNextCommand() |
java.lang.String |
getPrevCommand() |
public CommandHistory()
public CommandHistory(int capacity)
capacity
- public java.lang.String getPrevCommand()
public java.lang.String getNextCommand()
public void add(java.lang.String command)
command
- public int getCapacity()
public int getLength()