public interface HistoryManager
Modifier and Type | Method and Description |
---|---|
void |
addEntry(String newEntry)
Add a line or a block in history
|
void |
display()
Display all history entries with line numbers
|
String |
getEntry(int entryIndex)
Gets an entry in the history by giving its number
|
String |
getNextEntry(String beg)
Gets next entry in the history by giving its beginning
|
String |
getPreviousEntry(String beg)
Gets previous entry in the history by giving its beginning
|
String |
getTmpEntry()
Gets the currently edited command line before erasing it
|
boolean |
isInHistory()
Are we browsing history ?
|
void |
load()
Load history from a file
|
void |
reset()
Clears the history
|
void |
save()
Save history to a file
|
void |
setInHistory(boolean status)
Sets the flag indicating if we are browsing history
|
void |
setMaxEntryNumber(int numberOfEntries)
Set the maximum number of entries (lines/blocks) allowed in the history
|
void |
setTmpEntry(String currentCommandLine)
Saves the currently edited command line before erasing it
|
void addEntry(String newEntry)
newEntry
- the entry to be added at the end of the historyvoid display()
void setMaxEntryNumber(int numberOfEntries)
numberOfEntries
- the number of entries to setvoid reset()
void load()
void save()
String getEntry(int entryIndex)
entryIndex
- the index of the entry in the historyString getPreviousEntry(String beg)
beg
- the beginning of the entry (can be empty)String getNextEntry(String beg)
beg
- the beginning of the entry (can be empty)void setTmpEntry(String currentCommandLine)
currentCommandLine
- the text currently edited by the userString getTmpEntry()
boolean isInHistory()
void setInHistory(boolean status)
status
- is true if we begin to browse the history, false if we stop browsingCopyright © 2007-2012 Artenum. All Rights Reserved.