E - public class ArrayDeque<E> extends ArrayList<E>
modCount| 构造器和说明 |
|---|
ArrayDeque() |
| 限定符和类型 | 方法和说明 |
|---|---|
E |
peekFirst()
Get the first element of list.
|
static <E> E |
peekFirst(List<E> list)
Get the first element of list.
|
E |
peekLast()
Get the last element of list.
|
static <E> E |
peekLast(List<E> list)
Get the last element of list.
|
E |
pollFirst()
Remove the first element from list and return it.
|
static <E> E |
pollFirst(List<E> list)
Remove the first element from list and return it.
|
E |
pollLast()
Remove the last element from list and return it.
|
static <E> E |
pollLast(List<E> list)
Remove the last element from list and return it.
|
void |
removeRange(int fromIndex,
int toIndex)
Expose this methods so we not need to create a new subList just to
remove a range of elements.
|
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, trimToSizeequals, hashCodecontainsAll, toStringcontainsAll, equals, hashCodeparallelStream, streampublic static <E> E peekFirst(List<E> list)
public static <E> E pollFirst(List<E> list)
public static <E> E peekLast(List<E> list)
public static <E> E pollLast(List<E> list)
public E peekFirst()
public E peekLast()
public E pollFirst()
public E pollLast()
public 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 deque by (toIndex - fromIndex) elements.
(If toIndex==fromIndex, this operation has no effect.)removeRange 在类中 ArrayList<E>IndexOutOfBoundsException - if fromIndex or
toIndex is out of range
(fromIndex < 0 ||
fromIndex >= size() ||
toIndex > size() ||
toIndex < fromIndex)Copyright © 2021. All rights reserved.