|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.AbstractSequentialList<E>
public abstract class AbstractSequentialList<E>
AbstractSequentialList is an abstract implementation of the List interface. This implementation does not support adding. A subclass must implement the abstract method listIterator().
| Field Summary |
|---|
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| Constructor Summary | |
|---|---|
protected |
AbstractSequentialList()
Constructs a new instance of this AbstractSequentialList. |
| Method Summary | |
|---|---|
void |
add(int location,
E object)
Inserts the specified object into this List at the specified location. |
boolean |
addAll(int location,
Collection<? extends E> collection)
Inserts the objects in the specified Collection at the specified location in this List. |
E |
get(int location)
Returns the element at the specified location in this List. |
Iterator<E> |
iterator()
Returns an Iterator on the elements of this List. |
abstract ListIterator<E> |
listIterator(int location)
Returns a ListIterator on the elements of this List. |
E |
remove(int location)
Removes the object at the specified location from this List. |
E |
set(int location,
E object)
Replaces the element at the specified location in this List with the specified object. |
| Methods inherited from class java.util.AbstractList |
|---|
add, clear, equals, hashCode, indexOf, lastIndexOf, listIterator, removeRange, subList |
| Methods inherited from class java.util.AbstractCollection |
|---|
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, size, toArray, toArray, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
|---|
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, size, toArray, toArray |
| Constructor Detail |
|---|
protected AbstractSequentialList()
| Method Detail |
|---|
public void add(int location,
E object)
add in interface List<E>add in class AbstractList<E>location - the index at which to insertobject - 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
public boolean addAll(int location,
Collection<? extends E> collection)
addAll in interface List<E>addAll in class AbstractList<E>location - the index at which to insertcollection - 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()public E get(int location)
get in interface List<E>get in class AbstractList<E>location - the index of the element to return
IndexOutOfBoundsException - when location < 0 || >= size()public Iterator<E> iterator()
iterator in interface Iterable<E>iterator in interface Collection<E>iterator in interface List<E>iterator in class AbstractList<E>Iteratorpublic abstract ListIterator<E> listIterator(int location)
listIterator in interface List<E>listIterator in class AbstractList<E>location - the index at which to start the iteration
IndexOutOfBoundsException - when location < 0 || >= size()ListIteratorpublic E remove(int location)
remove in interface List<E>remove in class AbstractList<E>location - the index of the object to remove
UnsupportedOperationException - when removing from this List is not supported
IndexOutOfBoundsException - when location < 0 || >= size()
public E set(int location,
E object)
set in interface List<E>set in class AbstractList<E>location - the index at which to put the specified objectobject - 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()
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||