All Packages Class Hierarchy This Package Previous Next Index
Class mootcan.HistoryList
java.lang.Object
|
+----mootcan.HistoryList
- public class HistoryList
- extends Object
a doubly linked list containing history elements.
any object type can be inserted into the history list
- Author:
- Sindre Sørensen
-
current
-
-
defaultElement
-
-
earliest
-
-
latest
-
-
maxSize
-
-
size
-
-
HistoryList(Object, int)
-
-
appendEmptyItem()
-
-
getCurrentItem()
-
-
getNextItem()
-
-
getPreviousItem()
-
-
insertItem(Object)
-
-
removeEarliestItem()
-
-
replaceCurrentItem(Object)
-
size
int size
maxSize
int maxSize
latest
HistoryNode latest
earliest
HistoryNode earliest
current
HistoryNode current
defaultElement
Object defaultElement
HistoryList
HistoryList(Object defaultItem,
int maximumSize)
- Parameters:
- defaultItem - the (empty, if one wishes) object that will be returned when you have travelled beyond the latest point in history
- maximumSize - the maximum size the history list will become before removing the earliest items
getCurrentItem
public Object getCurrentItem()
getNextItem
public Object getNextItem()
replaceCurrentItem
public void replaceCurrentItem(Object o)
getPreviousItem
public Object getPreviousItem()
insertItem
public void insertItem(Object o)
appendEmptyItem
public HistoryNode appendEmptyItem()
removeEarliestItem
void removeEarliestItem()
All Packages Class Hierarchy This Package Previous Next Index