Class LinkedListImpl<E>
- java.lang.Object
-
- org.apache.activemq.artemis.utils.collections.LinkedListImpl<E>
-
- All Implemented Interfaces:
LinkedList<E>
public class LinkedListImpl<E> extends java.lang.Object implements LinkedList<E>
A linked list implementation which allows multiple iterators to exist at the same time on the queue, and which see any elements added or removed from the queue either directly or via iterators.This class is not thread safe.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLinkedListImpl.Node<E>
-
Constructor Summary
Constructors Constructor Description LinkedListImpl()LinkedListImpl(java.util.Comparator<E> comparator)LinkedListImpl(java.util.Comparator<E> comparator, NodeStore<E> supplier)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddHead(E e)voidaddSorted(E e)voidaddTail(E e)voidclear()voidclearID()LinkedListIterator<E>iterator()intnumIters()Epoll()EremoveWithID(java.lang.String listID, long id)you need to callLinkedList.setNodeStore(NodeStore)before you are able to call this method.voidsetNodeStore(NodeStore<E> supplier)this makes possibl to useLinkedList.removeWithID(String, long)intsize()java.lang.StringtoString()
-
-
-
Method Detail
-
clearID
public void clearID()
- Specified by:
clearIDin interfaceLinkedList<E>
-
setNodeStore
public void setNodeStore(NodeStore<E> supplier)
Description copied from interface:LinkedListthis makes possibl to useLinkedList.removeWithID(String, long)- Specified by:
setNodeStorein interfaceLinkedList<E>
-
addHead
public void addHead(E e)
- Specified by:
addHeadin interfaceLinkedList<E>
-
removeWithID
public E removeWithID(java.lang.String listID, long id)
Description copied from interface:LinkedListyou need to callLinkedList.setNodeStore(NodeStore)before you are able to call this method.- Specified by:
removeWithIDin interfaceLinkedList<E>
-
addTail
public void addTail(E e)
- Specified by:
addTailin interfaceLinkedList<E>
-
addSorted
public void addSorted(E e)
-
poll
public E poll()
- Specified by:
pollin interfaceLinkedList<E>
-
clear
public void clear()
- Specified by:
clearin interfaceLinkedList<E>
-
size
public int size()
- Specified by:
sizein interfaceLinkedList<E>
-
iterator
public LinkedListIterator<E> iterator()
- Specified by:
iteratorin interfaceLinkedList<E>
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
numIters
public int numIters()
-
-