| java.lang.Object | |||
| ↳ | java.util.AbstractCollection<E> | ||
| ↳ | java.util.AbstractList<E> | ||
| ↳ | java.util.AbstractSequentialList<E> | ||
Known Direct Subclasses
LinkedList<E>
|
AbstractSequentialList is an abstract implementation of the List interface. This implementation does not support adding. A subclass must implement the abstract method listIterator().
|
[Expand]
Inherited Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.util.AbstractList
| |||||||||||
| Protected Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a new instance of this AbstractSequentialList.
| |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Inserts the specified object into this List at the specified location.
| |||||||||||
Inserts the objects in the specified Collection at the specified location
in this List.
| |||||||||||
Returns the element at the specified location in this List.
| |||||||||||
Returns an Iterator on the elements of this List.
| |||||||||||
Returns a ListIterator on the elements of this List.
| |||||||||||
Removes the object at the specified location from this List.
| |||||||||||
Replaces the element at the specified location in this List with the
specified object.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class java.util.AbstractList
| |||||||||||
From class java.util.AbstractCollection
| |||||||||||
From class java.lang.Object
| |||||||||||
From interface java.lang.Iterable
| |||||||||||
From interface java.util.Collection
| |||||||||||
From interface java.util.List
| |||||||||||
Constructs a new instance of this AbstractSequentialList.
Inserts the specified object into this List at the specified location. The object is inserted before any previous element at the specified location. If the location is equal to the size of this List, the object is added at the end.
| location | the index at which to insert |
|---|---|
| object | the object to add |
| UnsupportedOperationException | when adding to this List is not supported |
|---|---|
| ClassCastException | when the class of the object is inappropriate for this List |
| IllegalArgumentException | when the object cannot be added to this List |
| IndexOutOfBoundsException | when location < 0 || >= size() |
| NullPointerException | when the object is null and this List does not support null elements |
Inserts the objects in the specified Collection at the specified location in this List. The objects are added in the order they are returned from the Collection iterator.
| location | the index at which to insert |
|---|---|
| collection | the Collection of objects |
| UnsupportedOperationException | when adding to this List is not supported |
|---|---|
| ClassCastException | when the class of an object is inappropriate for this List |
| IllegalArgumentException | when an object cannot be added to this List |
| IndexOutOfBoundsException | when location < 0 || >= size()
|
Returns the element at the specified location in this List.
| location | the index of the element to return |
|---|
| IndexOutOfBoundsException | when location < 0 || >= size()
|
|---|
Returns an Iterator on the elements of this List. The elements are iterated in the same order that they occur in the List.
Returns a ListIterator on the elements of this List. The elements are iterated in the same order that they occur in the List. The iteration starts at the specified location.
| location | the index at which to start the iteration |
|---|
| IndexOutOfBoundsException | when location < 0 || >= size() |
|---|
Removes the object at the specified location from this List.
| location | the index of the object to remove |
|---|
| UnsupportedOperationException | when removing from this List is not supported |
|---|---|
| IndexOutOfBoundsException | when location < 0 || >= size()
|
Replaces the element at the specified location in this List with the specified object.
| location | the index at which to put the specified object |
|---|---|
| object | the object to add |
| UnsupportedOperationException | when replacing elements in this List is not supported |
|---|---|
| ClassCastException | when the class of an object is inappropriate for this List |
| IllegalArgumentException | when an object cannot be added to this List |
| IndexOutOfBoundsException | when location < 0 || >= size()
|