public class ArrayBlockList<V>
extends java.util.ArrayList<V>
Constructor and Description |
---|
ArrayBlockList()
Constructs an empty list with an initial capacity of ten.
|
ArrayBlockList(java.util.Collection<? extends V> c)
Constructs a list containing the elements of the specified
collection, in the order they are returned by the collection's
iterator.
|
ArrayBlockList(int initialCapacity)
Constructs an empty list with the specified initial capacity.
|
Modifier and Type | Method and Description |
---|---|
void |
removeRange(int fromIndex,
int toIndex)
Removes from this list all of the elements whose index is between
fromIndex , inclusive, and toIndex , exclusive. |
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
public ArrayBlockList(int initialCapacity)
initialCapacity
- the initial capacity of the listjava.lang.IllegalArgumentException
- if the specified initial capacity
is negativepublic ArrayBlockList()
public ArrayBlockList(java.util.Collection<? extends V> c)
c
- the collection whose elements are to be placed into this listjava.lang.NullPointerException
- if the specified collection is nullpublic void removeRange(int fromIndex, int toIndex)
fromIndex
, inclusive, and toIndex
, exclusive.
Shifts any succeeding elements to the left (reduces their index).
This call shortens the list by (toIndex - fromIndex)
elements.
(If toIndex==fromIndex
, this operation has no effect.)removeRange
in class java.util.ArrayList<V>
fromIndex
- index of first element to be removedtoIndex
- index after last element to be removedjava.lang.IndexOutOfBoundsException
- if fromIndex or toIndex out of
range (fromIndex < 0 || fromIndex >= size() || toIndex
> size() || toIndex < fromIndex)