|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jppf.utils.TraversalList<E>
E - The element type for this list.public class TraversalList<E>
A list that maintains and manages a current position and corresponding current element.
| Constructor Summary | |
|---|---|
TraversalList()
Default initialization. |
|
TraversalList(List<E> list)
Initialize this traversal list with a specified list with the same element type. |
|
| Method Summary | |
|---|---|
void |
add(E element)
Add a new element to the list. |
boolean |
contains(E element)
Determine whether this traversal list contains a specified element. |
void |
decPosition()
Increment the current position by 1. |
E |
getCurrentElement()
Return the element at the current position in the list. |
E |
getFirst()
Get the first element in the list. |
E |
getLast()
Get the last element in the list. |
List<E> |
getList()
Get the list of elements of this traversal list. |
int |
getPosition()
Get the current position in the list. |
void |
incPosition()
Increment the current position by 1. |
void |
setPosition(int pos)
Set the current position in the list. |
int |
size()
Get the number of elements in this traversal list. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TraversalList()
public TraversalList(List<E> list)
list - a list with the same element type as this traversal list.| Method Detail |
|---|
public void add(E element)
element - the element to add.public E getFirst()
public E getLast()
public void incPosition()
public void decPosition()
public List<E> getList()
public int getPosition()
public void setPosition(int pos)
pos - the position as an int value, -1 if the lsit is empty.public E getCurrentElement()
public int size()
public boolean contains(E element)
element - the element to lookup.
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||