public class MemoryHistory extends Object implements History
History.History.Entry| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_MAX_SIZE |
| Constructor and Description |
|---|
MemoryHistory() |
| Modifier and Type | Method and Description |
|---|---|
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() |
public static final int DEFAULT_MAX_SIZE
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 CharSequence get(int index)
public void set(int index,
CharSequence item)
Historypublic void add(CharSequence item)
public CharSequence remove(int i)
Historypublic CharSequence removeFirst()
HistoryremoveFirst in interface Historypublic CharSequence removeLast()
HistoryremoveLast in interface Historyprotected void internalAdd(CharSequence item)
public void replace(CharSequence item)
public ListIterator<History.Entry> entries(int index)
public ListIterator<History.Entry> entries()
public Iterator<History.Entry> iterator()
iterator in interface Iterable<History.Entry>iterator in interface Historypublic boolean moveToLast()
moveToLast in interface Historypublic boolean moveTo(int index)
public boolean moveToFirst()
moveToFirst in interface Historypublic void moveToEnd()
public CharSequence current()
public boolean previous()
public boolean next()
Copyright © 2014. All Rights Reserved.