| Constructor and Description |
|---|
List() |
| Modifier and Type | Method and Description |
|---|---|
void |
append(T it)
Append item, O(n) - use push() and
reverse() to iterate in insertion order!
|
void |
appendList(T list)
Append Inlist.
|
T |
clear()
Clear list.
|
boolean |
hasNext()
Iterator: Has next item
|
T |
head() |
java.util.Iterator<T> |
iterator()
NB: Only one iterator at a time possible!
|
T |
next()
Iterator: Get next item
|
T |
pop()
Insert item at start of list.
|
void |
push(T it)
Insert single item at start of list.
|
void |
remove()
Iterator: Remove current item
|
void |
remove(T it)
Remove item from list.
|
void |
reverse()
Reverse list.
|
int |
size() |
public void push(T it)
public T pop()
public void reverse()
public void append(T it)
public void appendList(T list)
public void remove(T it)
public T clear()
public T head()
public boolean hasNext()
public T next()
public void remove()
public java.util.Iterator<T> iterator()
public int size()