| java.lang.Object | |
| ↳ | com.pnfsoftware.jeb.util.collect.ItemHistory<T> |
Generic tracker of items, based on a simple history queue (get last, get next) model.
Typically, such objects are long-lived; internally, references to items are strong. Therefore, it is up to the user to make sure that referenced objects are not prevented from being garbage collected, should they be.
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| ItemHistory() | |||||||||||
| ItemHistory(boolean cleanHistoryAfterIndex) | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| void | add(T item) | ||||||||||
| List<T> |
getList()
Retrieve a copy of the current list
| ||||||||||
| T | getNext(T updatedItem) | ||||||||||
| T | getNext() | ||||||||||
| T | getPrevious(T updatedItem) | ||||||||||
| T | getPrevious() | ||||||||||
| boolean | hasNext() | ||||||||||
| boolean | hasPrevious() | ||||||||||
| int | position() | ||||||||||
| boolean | remove(T item) | ||||||||||
| void | reset() | ||||||||||
| int | size() | ||||||||||
| String | toString() | ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Retrieve a copy of the current list