|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjline.console.history.MemoryHistory
public class MemoryHistory
Non-persistent History.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface jline.console.history.History |
|---|
History.Entry |
| Field Summary | |
|---|---|
static int |
DEFAULT_MAX_SIZE
|
| Constructor Summary | |
|---|---|
MemoryHistory()
|
|
| Method Summary | |
|---|---|
void |
add(CharSequence item)
|
void |
clear()
|
CharSequence |
current()
Return the content of the current buffer. |
ListIterator<History.Entry> |
entries()
|
ListIterator<History.Entry> |
entries(int index)
|
CharSequence |
get(int index)
|
int |
getMaxSize()
|
int |
index()
|
protected void |
internalAdd(CharSequence item)
|
boolean |
isAutoTrim()
|
boolean |
isEmpty()
|
boolean |
isIgnoreDuplicates()
|
Iterator<History.Entry> |
iterator()
|
boolean |
moveTo(int index)
Move to the specified index in the history |
void |
moveToEnd()
Move to the end of the history buffer. |
boolean |
moveToFirst()
Moves the history index to the first entry. |
boolean |
moveToLast()
This moves the history to the last entry. |
boolean |
next()
Move the pointer to the next element in the buffer. |
boolean |
previous()
Move the pointer to the previous element in the buffer. |
CharSequence |
remove(int i)
Remove the history element at the given index. |
CharSequence |
removeFirst()
Remove the first element from history. |
CharSequence |
removeLast()
Remove the last element from history |
void |
replace(CharSequence item)
|
void |
set(int index,
CharSequence item)
Set the history item at the given index to the given CharSequence. |
void |
setAutoTrim(boolean flag)
|
void |
setIgnoreDuplicates(boolean flag)
|
void |
setMaxSize(int maxSize)
|
int |
size()
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int DEFAULT_MAX_SIZE
| Constructor Detail |
|---|
public MemoryHistory()
| Method Detail |
|---|
public void setMaxSize(int maxSize)
public int getMaxSize()
public boolean isIgnoreDuplicates()
public void setIgnoreDuplicates(boolean flag)
public boolean isAutoTrim()
public void setAutoTrim(boolean flag)
public int size()
size in interface Historypublic boolean isEmpty()
isEmpty in interface Historypublic int index()
index in interface Historypublic void clear()
clear in interface Historypublic CharSequence get(int index)
get in interface History
public void set(int index,
CharSequence item)
History
set in interface Historyindex - the index of the history offsetitem - the new itempublic void add(CharSequence item)
add in interface Historypublic CharSequence remove(int i)
History
remove in interface Historyi - the index of the element to remove
public CharSequence removeFirst()
History
removeFirst in interface Historypublic CharSequence removeLast()
History
removeLast in interface Historyprotected void internalAdd(CharSequence item)
public void replace(CharSequence item)
replace in interface Historypublic ListIterator<History.Entry> entries(int index)
entries in interface Historypublic ListIterator<History.Entry> entries()
entries in interface Historypublic Iterator<History.Entry> iterator()
iterator in interface Iterable<History.Entry>iterator in interface Historypublic boolean moveToLast()
moveToLast in interface Historypublic boolean moveTo(int index)
moveTo in interface Historyindex -
public boolean moveToFirst()
moveToFirst in interface Historypublic void moveToEnd()
moveToEnd in interface Historypublic CharSequence current()
current in interface Historypublic boolean previous()
previous in interface Historypublic boolean next()
next in interface Historypublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||