public class LinkedList extends List
Constructor and Description |
---|
LinkedList() |
Modifier and Type | Method and Description |
---|---|
void |
add(int index,
java.lang.Object value)
Inserts the value at position index.
|
void |
add(java.lang.Object value)
Appends the value to the end of this list.
|
java.lang.Object |
get(int index)
Returns the value at position index.
|
int |
indexOf(java.lang.Object value)
Returns the index of the first occurrence of the value.
|
Iterator |
iterator()
Returns an iterator of the values in this list.
|
java.lang.Object |
remove(int index)
Removes the value at position index.
|
int |
size()
Returns the number of values in this list.
|
java.lang.Object[] |
toArray(java.lang.Object[] array)
Returns an array containing all of the elements in this list in proper sequence (from first to last element); the runtime type of the returned array is that of the specified array.
|
public void add(java.lang.Object value)
public void add(int index, java.lang.Object value)
public java.lang.Object get(int index)
public int indexOf(java.lang.Object value)
public java.lang.Object remove(int index)
public Iterator iterator()
public java.lang.Object[] toArray(java.lang.Object[] array)