public class LinkedListImpl<E> extends Object implements LinkedList<E>
This class is not thread safe.
| Modifier and Type | Class and Description |
|---|---|
static class |
LinkedListImpl.Node<E> |
| Constructor and Description |
|---|
LinkedListImpl() |
LinkedListImpl(Comparator<E> comparator) |
LinkedListImpl(Comparator<E> comparator,
NodeStore<E> supplier) |
| Modifier and Type | Method and Description |
|---|---|
void |
addHead(E e) |
void |
addSorted(E e) |
void |
addTail(E e) |
void |
clear() |
void |
clearID() |
LinkedListIterator<E> |
iterator() |
int |
numIters() |
E |
poll() |
E |
removeWithID(String listID,
long id)
you need to call
LinkedList.setNodeStore(NodeStore) before you are able to call this method. |
void |
setNodeStore(NodeStore<E> supplier)
this makes possibl to use
LinkedList.removeWithID(String, long) |
int |
size() |
String |
toString() |
public LinkedListImpl()
public LinkedListImpl(Comparator<E> comparator)
public LinkedListImpl(Comparator<E> comparator, NodeStore<E> supplier)
public void clearID()
clearID in interface LinkedList<E>public void setNodeStore(NodeStore<E> supplier)
LinkedListLinkedList.removeWithID(String, long)setNodeStore in interface LinkedList<E>public void addHead(E e)
addHead in interface LinkedList<E>public E removeWithID(String listID, long id)
LinkedListLinkedList.setNodeStore(NodeStore) before you are able to call this method.removeWithID in interface LinkedList<E>public void addTail(E e)
addTail in interface LinkedList<E>public void addSorted(E e)
public E poll()
poll in interface LinkedList<E>public void clear()
clear in interface LinkedList<E>public int size()
size in interface LinkedList<E>public LinkedListIterator<E> iterator()
iterator in interface LinkedList<E>public int numIters()
Copyright © 2022 The Apache Software Foundation. All rights reserved.