public class MemoryHistory extends java.lang.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(java.lang.CharSequence item) |
void |
clear() |
java.lang.CharSequence |
current()
Return the content of the current buffer.
|
java.util.ListIterator<History.Entry> |
entries() |
java.util.ListIterator<History.Entry> |
entries(int index) |
java.lang.CharSequence |
get(int index) |
int |
getMaxSize() |
int |
index() |
protected void |
internalAdd(java.lang.CharSequence item) |
boolean |
isAutoTrim() |
boolean |
isEmpty() |
boolean |
isIgnoreDuplicates() |
java.util.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.
|
java.lang.CharSequence |
remove(int i)
Remove the history element at the given index.
|
java.lang.CharSequence |
removeFirst()
Remove the first element from history.
|
java.lang.CharSequence |
removeLast()
Remove the last element from history
|
void |
replace(java.lang.CharSequence item) |
void |
set(int index,
java.lang.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() |
java.lang.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 void set(int index, java.lang.CharSequence item)
History
public java.lang.CharSequence remove(int i)
History
public java.lang.CharSequence removeFirst()
History
removeFirst
in interface History
public java.lang.CharSequence removeLast()
History
removeLast
in interface History
protected void internalAdd(java.lang.CharSequence item)
public java.util.ListIterator<History.Entry> entries(int index)
public java.util.ListIterator<History.Entry> entries()
public java.util.Iterator<History.Entry> iterator()
iterator
in interface java.lang.Iterable<History.Entry>
iterator
in interface History
public boolean moveToLast()
moveToLast
in interface History
public boolean moveTo(int index)
public boolean moveToFirst()
moveToFirst
in interface History
public void moveToEnd()
public java.lang.CharSequence current()
public boolean previous()
public boolean next()
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2018. All Rights Reserved.