T
- public class BaseHistory<T> extends java.lang.Object implements History<T>
Modifier and Type | Field and Description |
---|---|
protected java.util.List<T> |
history |
protected int |
maxsize |
EMPTY_UNMODIFIABLEBASICLIST
EMPTY_GETITEMWITHSIZEANDITERATOR
Constructor and Description |
---|
BaseHistory(int size) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(T element)
This method add an element with a key name.
|
void |
clear() |
T |
get(int position) |
T |
getLatest() |
boolean |
isEmpty() |
java.util.Iterator<T> |
iterator() |
int |
size() |
java.util.List<T> |
toList() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isEmpty, isEmpty, isEmptyQuietly
protected int maxsize
protected java.util.List<T> history
public boolean add(T element)
History
public java.util.List<T> toList()
toList
in interface UnmodifiableBasicList<T>
public java.util.Iterator<T> iterator()
iterator
in interface java.lang.Iterable<T>