|
||||||||||
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 History
public boolean isEmpty()
isEmpty
in interface History
public int index()
index
in interface History
public void clear()
clear
in interface History
public CharSequence get(int index)
get
in interface History
public void set(int index, CharSequence item)
History
set
in interface History
index
- the index of the history offsetitem
- the new itempublic void add(CharSequence item)
add
in interface History
public CharSequence remove(int i)
History
remove
in interface History
i
- the index of the element to remove
public CharSequence removeFirst()
History
removeFirst
in interface History
public CharSequence removeLast()
History
removeLast
in interface History
protected void internalAdd(CharSequence item)
public void replace(CharSequence item)
replace
in interface History
public ListIterator<History.Entry> entries(int index)
entries
in interface History
public ListIterator<History.Entry> entries()
entries
in interface History
public Iterator<History.Entry> iterator()
iterator
in interface Iterable<History.Entry>
iterator
in interface History
public boolean moveToLast()
moveToLast
in interface History
public boolean moveTo(int index)
moveTo
in interface History
index
-
public boolean moveToFirst()
moveToFirst
in interface History
public void moveToEnd()
moveToEnd
in interface History
public CharSequence current()
current
in interface History
public boolean previous()
previous
in interface History
public boolean next()
next
in interface History
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |