public abstract class List
extends java.lang.Object
Constructor and Description |
---|
List() |
Modifier and Type | Method and Description |
---|---|
abstract void |
add(int index,
java.lang.Object value)
Inserts the value at position index (optional operation).
|
abstract void |
add(java.lang.Object value)
Appends the value to the end of this list.
|
abstract java.lang.Object |
get(int index)
Returns the value at position index.
|
abstract int |
indexOf(java.lang.Object value)
Returns the index of the first occurrence of the value.
|
abstract Iterator |
iterator()
Returns an iterator of the values in this list.
|
abstract java.lang.Object |
remove(int index)
Removes the value at position index (optional operation).
|
abstract int |
size()
Returns the number of values in this list.
|
public abstract void add(java.lang.Object value)
public abstract void add(int index, java.lang.Object value)
java.lang.UnsupportedOperationException
- if the add operation is not support by this listjava.lang.IndexOutOfBoundsException
- if the index is out of range (index < 0 || index > size())public abstract java.lang.Object get(int index)
java.lang.IndexOutOfBoundsException
- if the index is out of range (index < 0 || index > size())public abstract java.lang.Object remove(int index)
java.lang.UnsupportedOperationException
- if the remove operation is not support by this listjava.lang.IndexOutOfBoundsException
- if the index is out of range (index < 0 || index > size())public abstract int indexOf(java.lang.Object value)
public abstract int size()
public abstract Iterator iterator()