K - the key typepublic class ConcurrentLinkedList<K>
extends java.lang.Object
| Constructor and Description |
|---|
ConcurrentLinkedList() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(K obj)
Add an element at the end.
|
java.util.Iterator<K> |
iterator()
Get an iterator over all entries.
|
K |
peekFirst()
Get the first element, or null if none.
|
K |
peekLast()
Get the last element, or null if none.
|
boolean |
removeFirst(K obj)
Remove the first element, if it matches.
|
boolean |
removeLast(K obj)
Remove the last element, if it matches.
|
public K peekFirst()
public K peekLast()
public void add(K obj)
obj - the elementpublic boolean removeFirst(K obj)
obj - the element to removepublic boolean removeLast(K obj)
obj - the element to removepublic java.util.Iterator<K> iterator()