GeezerVison is showing docs.oracle.com — AbstractSequentialList (Java Platform SE 8 )
Java™ Platform Standard Ed. 8
compact1, compact2, compact3
java.util
Class AbstractSequentialList<E>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods
| Modifier and Type |
Method |
Description |
void |
add(int index,
E element) |
Inserts the specified element at the specified position in this list
(optional operation).
|
boolean |
addAll(int index,
Collection<? extends E> c) |
Inserts all of the elements in the specified collection into this
list at the specified position (optional operation).
|
E |
get(int index) |
Returns the element at the specified position in this list.
|
Iterator<E> |
iterator() |
Returns an iterator over the elements in this list (in proper
sequence).
|
abstract ListIterator<E> |
listIterator(int index) |
Returns a list iterator over the elements in this list (in proper
sequence).
|
E |
remove(int index) |
Removes the element at the specified position in this list (optional
operation).
|
E |
set(int index,
E element) |
Replaces the element at the specified position in this list with the
specified element (optional operation).
|
-
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, size, toArray, toArray, toString
-
Methods inherited from interface java.util.List
addAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, size, sort, spliterator, toArray, toArray
-
-
Constructor Detail
-
AbstractSequentialList
protected AbstractSequentialList()
Sole constructor. (For invocation by subclass constructors, typically
implicit.)
-
Method Detail
-
get
public E get(int index)
Returns the element at the specified position in this list.
This implementation first gets a list iterator pointing to the
indexed element (with listIterator(index)). Then, it gets
the element using ListIterator.next and returns it.
- Specified by:
get in interface List<E>
- Specified by:
get in class AbstractList<E>
- Parameters:
index - index of the element to return
- Returns:
- the element at the specified position in this list
- Throws:
IndexOutOfBoundsException - if the index is out of range
(index < 0 || index >= size())
Java™ Platform Standard Ed. 8
Submit a bug or feature For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. Copyright © 1993, 2026, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
|