E - the type of element stored in the listpublic class UnrolledLinkedList<E> extends AbstractSequentialList<E> implements Deque<E>, Cloneable, Serializable
modCount| Constructor and Description |
|---|
UnrolledLinkedList()
Constructs a new, empty unrolled linked list with a default unroll count of 16.
|
UnrolledLinkedList(Collection<? extends E> coll)
Constructs a new unrolled linked list with a default unroll count of 16, populated with the
elements of the specified collection.
|
UnrolledLinkedList(int unrollCount)
Constructs a new, empty unrolled linked list with the specified unroll count.
|
UnrolledLinkedList(int unrollCount,
Collection<? extends E> coll)
Constructs a new unrolled linked list with the specified unroll count, populated with the
elements of the specified collection.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(E e) |
void |
add(int index,
E e) |
void |
addFirst(E e) |
void |
addLast(E e) |
void |
clear() |
UnrolledLinkedList<E> |
clone() |
Iterator<E> |
descendingIterator() |
E |
element() |
E |
get(int index) |
E |
getFirst() |
E |
getLast() |
ListIterator<E> |
listIterator(int index) |
boolean |
offer(E e) |
boolean |
offerFirst(E e) |
boolean |
offerLast(E e) |
E |
peek() |
E |
peekFirst() |
E |
peekLast() |
E |
poll() |
E |
pollFirst() |
E |
pollLast() |
E |
pop() |
void |
push(E e) |
E |
remove() |
E |
remove(int index) |
E |
removeFirst() |
boolean |
removeFirstOccurrence(Object o) |
E |
removeLast() |
boolean |
removeLastOccurrence(Object o) |
E |
set(int index,
E e) |
int |
size() |
addAll, iteratorequals, hashCode, indexOf, lastIndexOf, listIterator, removeRange, subListaddAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitaddAll, containsAll, equals, hashCode, isEmpty, parallelStream, removeAll, removeIf, retainAll, spliterator, stream, toArray, toArrayaddAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArraypublic UnrolledLinkedList()
public UnrolledLinkedList(Collection<? extends E> coll)
coll - the collection of elements which will be present in the newly constructed listpublic UnrolledLinkedList(int unrollCount)
unrollCount - the number of elements "unrolled" into each linked list nodepublic UnrolledLinkedList(int unrollCount,
Collection<? extends E> coll)
unrollCount - the number of elements "unrolled" into each linked list nodecoll - the collection of elements which will be present in the newly constructed listpublic boolean add(E e)
public void add(int index,
E e)
public E get(int index)
public E remove(int index)
public void clear()
clear in interface Collection<E>clear in interface List<E>clear in class AbstractList<E>public boolean offerFirst(E e)
offerFirst in interface Deque<E>public E removeFirst()
removeFirst in interface Deque<E>public E removeLast()
removeLast in interface Deque<E>public boolean removeFirstOccurrence(Object o)
removeFirstOccurrence in interface Deque<E>public boolean removeLastOccurrence(Object o)
removeLastOccurrence in interface Deque<E>public boolean offer(E e)
public E remove()
public E poll()
public E element()
public E peek()
public Iterator<E> descendingIterator()
descendingIterator in interface Deque<E>public ListIterator<E> listIterator(int index)
listIterator in interface List<E>listIterator in class AbstractSequentialList<E>public int size()
public UnrolledLinkedList<E> clone()