public class


extends Object
   ↳ com.pnfsoftware.jeb.util.collect.ItemHistory<T>

Class Overview

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(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()
Inherited Methods
From class java.lang.Object

Public Constructors

public ItemHistory ()

public ItemHistory (boolean cleanHistoryAfterIndex)

Public Methods

public void add (T item)

public List<T> getList ()

Retrieve a copy of the current list

public T getNext (T updatedItem)

public T getNext ()

public T getPrevious (T updatedItem)

public T getPrevious ()

public boolean hasNext ()

public boolean hasPrevious ()

public int position ()

public boolean remove (T item)

public void reset ()

public int size ()

public String toString ()