Class EmptyList<E>
- java.lang.Object
-
- org.apache.activemq.artemis.utils.collections.EmptyList<E>
-
- All Implemented Interfaces:
LinkedList<E>
public class EmptyList<E> extends Object implements LinkedList<E>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddHead(E e)voidaddTail(E e)voidclear()voidclearID()voidforEach(Consumer<E> consumer)Eget(int position)static <T> LinkedList<T>getEmptyList()LinkedListIterator<E>iterator()Epeek()Epoll()EremoveWithID(String listID, long id)you need to callLinkedList.setNodeStore(NodeStore)before you are able to call this method.voidsetNodeStore(NodeStore<E> store)this makes possibl to useLinkedList.removeWithID(String, long)intsize()
-
-
-
Method Detail
-
getEmptyList
public static final <T> LinkedList<T> getEmptyList()
-
peek
public E peek()
- Specified by:
peekin interfaceLinkedList<E>
-
addHead
public void addHead(E e)
- Specified by:
addHeadin interfaceLinkedList<E>
-
addTail
public void addTail(E e)
- Specified by:
addTailin interfaceLinkedList<E>
-
get
public E get(int position)
- Specified by:
getin interfaceLinkedList<E>
-
poll
public E poll()
- Specified by:
pollin interfaceLinkedList<E>
-
iterator
public LinkedListIterator<E> iterator()
- Specified by:
iteratorin interfaceLinkedList<E>
-
clear
public void clear()
- Specified by:
clearin interfaceLinkedList<E>
-
size
public int size()
- Specified by:
sizein interfaceLinkedList<E>
-
clearID
public void clearID()
- Specified by:
clearIDin interfaceLinkedList<E>
-
setNodeStore
public void setNodeStore(NodeStore<E> store)
Description copied from interface:LinkedListthis makes possibl to useLinkedList.removeWithID(String, long)- Specified by:
setNodeStorein interfaceLinkedList<E>
-
removeWithID
public E removeWithID(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>
-
forEach
public void forEach(Consumer<E> consumer)
- Specified by:
forEachin interfaceLinkedList<E>
-
-