|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.frag.umlplugin.history.HistoryList<T>
public class HistoryList<T>
Bounded list for history storage.
Constructor Summary | |
---|---|
HistoryList(int maxSize)
Creates a new bounded list with given maximum size. |
Method Summary | |
---|---|
void |
add(T element)
Adds the given element to this list. |
boolean |
canStepBack()
Checks whether a step back in the history is possible. |
boolean |
canStepForward()
Checks whether a step forward in the history is possible. |
void |
clear()
Clears this history. |
int |
getMaxSize()
Gets the maximum size of this bounded list. |
java.util.Iterator<T> |
iterator()
Gets iterator that iterates over all active elements in this history list. |
void |
rewind()
Rewinds history to beginning. |
int |
size()
Gets the current size of this list. |
T |
stepBack()
Steps back in the history and returns the corresponing element. |
T |
stepForward()
Steps forward in the history and returns the corresponing element. |
java.util.List<T> |
toList(boolean includeForwardableEntries)
Converts this history list to a list. |
java.lang.String |
toString()
Returns a string representation of the list. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public HistoryList(int maxSize)
maxSize
- maximum sizeMethod Detail |
---|
@NotNull public java.util.Iterator<T> iterator()
iterator
in interface java.lang.Iterable<T>
public void clear()
public void add(@NotNull T element)
stepBack()
,
then alle elements after the added element will be discarded.
element
- element to add@NotNull public T stepBack()
stepBack()
, the
result will be the element that was added just before the last added element.
@NotNull public T stepForward()
public void rewind()
public boolean canStepBack()
public boolean canStepForward()
public int size()
public int getMaxSize()
@NotNull public java.util.List<T> toList(boolean includeForwardableEntries)
includeForwardableEntries
- true, if entries that can be enabled by calls to stepForward()
should be included; false otherwise
@NotNull public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |