package logging; import visualisation.HybridWindow; import java.util.Vector; /** * This class provides a container for log list elements. * Use it in assoziation with packages logging and visualization. * In general you will not have to extend this class so it is final. * @see logging.Algorithm * @see logging.LogElement * @see HybridWindow * @see java.util.Vector * @author Bj�rn Strobel
* University of Cooperative Education Stuttgart, * Campus Horb
* Department of Information Technology
* it2003
*/ public final class LogElementList extends Vector{ /** Index of the Lists actual element.*/ private int actual; /** Determines wether the log element list's index is valid or not.*/ private boolean initialized; /** * Standard constructor. * Creates an empty uninitialized log list with index -1. */ public LogElementList() { super(); actual=-1; initialized=false; // TODO Auto-generated constructor stub } /** * Returns the log lists actual element identified by member actual. * @return the log lists actual element */ public Object get(){ return get(actual); } /** * Returns wether the log element list is initialized or not. * @return true if list is initialized, false if not */ public boolean isInitialized(){ return initialized; } /** * Clears the log list. */ public void clear(){ super.clear(); actual=-1; initialized=false; } /** * Sets the actual's element's previous as actual. */ public void prev(){ if(actual>0){ actual--;} else{ actual=0;} initialized=true; } /** * Sets the actual's element's next as actual. */ public void next(){ if(actual