|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.h2.dev.util.ConcurrentLinkedList<K>
K - the key typepublic class ConcurrentLinkedList<K>
A very simple linked list that supports concurrent access. Internally, it uses immutable objects. It uses recursion and is not meant for long lists.
| Constructor Summary | |
|---|---|
ConcurrentLinkedList()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConcurrentLinkedList()
| Method Detail |
|---|
public K peekFirst()
public K peekLast()
public void add(K obj)
obj - the elementpublic boolean removeFirst(K obj)
obj - the element to remove
public boolean removeLast(K obj)
obj - the element to remove
public java.util.Iterator<K> iterator()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||