E - element typepublic class ChunkList<E> extends AbstractSequentialList<E>
LinkedList, but stores elements
in chunks of 32 elements.
ArrayList has O(n) insertion and deletion into the middle of the list. ChunkList insertion and deletion are O(1).
modCount| Constructor and Description |
|---|
ChunkList()
Creates an empty ChunkList.
|
ChunkList(Collection<E> collection)
Creates a ChunkList whose contents are a given Collection.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(E element) |
void |
add(int index,
E element) |
ListIterator<E> |
listIterator(int index) |
int |
size() |
clear, equals, hashCode, indexOf, lastIndexOf, listIterator, removeRange, subListaddAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringpublic ChunkList()
public ChunkList(Collection<E> collection)
public ListIterator<E> listIterator(int index)
listIterator in interface List<E>listIterator in class AbstractSequentialList<E>public int size()
size in interface Collection<E>size in interface List<E>size in class AbstractCollection<E>public boolean add(E element)
add in interface Collection<E>add in interface List<E>add in class AbstractList<E>Copyright © 2012–2015 The Apache Software Foundation. All rights reserved.