public abstract class AbstractSequentialList extends AbstractList
modCount
Modifier | Constructor and Description |
---|---|
protected |
AbstractSequentialList()
Constructs a new instance of this AbstractSequentialList.
|
Modifier and Type | Method and Description |
---|---|
void |
add(int location,
Object object)
Inserts the specified object into this List at the specified location.
|
boolean |
addAll(int location,
Collection collection)
Inserts the objects in the specified Collection at the specified location
in this List.
|
Object |
get(int location)
Returns the element at the specified location in this list.
|
Iterator |
iterator()
Returns an iterator on the elements of this list.
|
abstract ListIterator |
listIterator(int location)
Returns a list iterator on the elements of this list.
|
Object |
remove(int location)
Removes the object at the specified location from this list.
|
Object |
set(int location,
Object object)
Replaces the element at the specified location in this list with the
specified object.
|
add, clear, equals, hashCode, indexOf, lastIndexOf, listIterator, removeRange, subList
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, size, toArray, toArray, toString
protected AbstractSequentialList()
public void add(int location, Object object)
AbstractList
Concrete implementations that would like to support the add functionality must override this method.
add
in interface List
add
in class AbstractList
location
- the index at which to insert.object
- the object to add.public boolean addAll(int location, Collection collection)
AbstractList
addAll
in interface List
addAll
in class AbstractList
location
- the index at which to insert.collection
- the Collection of objectstrue
if this List is modified, false
otherwise.public Object get(int location)
AbstractList
get
in interface List
get
in class AbstractList
location
- the index of the element to return.public Iterator iterator()
AbstractList
iterator
in interface Collection
iterator
in interface List
iterator
in class AbstractList
Iterator
public abstract ListIterator listIterator(int location)
AbstractList
listIterator
in interface List
listIterator
in class AbstractList
location
- the index at which to start the iteration.ListIterator
public Object remove(int location)
AbstractList
remove
in interface List
remove
in class AbstractList
location
- the index of the object to remove.public Object set(int location, Object object)
AbstractList
set
in interface List
set
in class AbstractList
location
- the index at which to put the specified object.object
- the object to add.