V
- the value typepublic interface History<V>
Modifier and Type | Method and Description |
---|---|
boolean |
canGoBack(V current)
Check if it is possible to go back starting from the current element.
|
boolean |
canGoForward(V current)
Check if it is possible to go forward starting from the current element.
|
void |
clear()
Clears the history
|
boolean |
contains(V element)
Checks if history contains the elements.
|
List<V> |
elements()
Gets the list of elements.
|
V |
goBack(V current)
Returns element of the history which was visited prior to current.
|
V |
goForward(V current)
Returns element of the history which was visited after the current.
|
void |
remove(V element)
Removes the element for the history.
|
void |
setMaxSize(int value)
Sets the maximum size of the history.
|
int |
size()
Returns the current size of the history.
|
void |
visit(V element)
Visits the element.
|
boolean canGoBack(V current)
current
- the current elementboolean canGoForward(V current)
current
- the current elementvoid clear()
boolean contains(V element)
element
- the element to checkList<V> elements()
V goBack(V current)
current
- the current elementV goForward(V current)
current
- the current elementvoid remove(V element)
element
- the elementvoid setMaxSize(int value)
value
- the new max sizeint size()
void visit(V element)
element
- the elementCopyright © 2010-2020 Toolsverse. All Rights Reserved.