public interface List extends Collection
Modifier and Type | Method and Description |
---|---|
void |
add(int index,
Object element) |
boolean |
add(Object o) |
boolean |
addAll(Collection c) |
boolean |
addAll(int index,
Collection c) |
void |
clear() |
boolean |
contains(Object o) |
boolean |
containsAll(Collection c) |
boolean |
equals(Object o)
Default object equality (is identity).
|
Object |
get(int index) |
int |
hashCode()
The (default) object hashcode: for transient objects this is simply the
address of the instance in memory, for persistent objects it is the
address at which the instance was first created (maybe in a previous
activation of the VM).
|
int |
indexOf(Object o) |
boolean |
isEmpty() |
Iterator |
iterator() |
int |
lastIndexOf(Object o) |
ListIterator |
listIterator() |
ListIterator |
listIterator(int index) |
Object |
remove(int index) |
boolean |
remove(Object o) |
boolean |
removeAll(Collection c) |
boolean |
retainAll(Collection c) |
Object |
set(int index,
Object element) |
int |
size() |
List |
subList(int fromIndex,
int toIndex) |
Object[] |
toArray() |
Object[] |
toArray(Object[] a) |
int size()
size
in interface Collection
boolean isEmpty()
isEmpty
in interface Collection
boolean contains(Object o)
contains
in interface Collection
Iterator iterator()
iterator
in interface Collection
Object[] toArray()
toArray
in interface Collection
Object[] toArray(Object[] a) throws ArrayStoreException
toArray
in interface Collection
ArrayStoreException
boolean add(Object o) throws ClassCastException, IllegalArgumentException, UnsupportedOperationException
add
in interface Collection
ClassCastException
IllegalArgumentException
UnsupportedOperationException
boolean remove(Object o)
remove
in interface Collection
boolean containsAll(Collection c) throws ConcurrentModificationException
containsAll
in interface Collection
ConcurrentModificationException
boolean addAll(Collection c) throws ClassCastException, IllegalArgumentException, IndexOutOfBoundsException, NullPointerException, UnsupportedOperationException, ConcurrentModificationException
addAll
in interface Collection
ClassCastException
IllegalArgumentException
IndexOutOfBoundsException
NullPointerException
UnsupportedOperationException
ConcurrentModificationException
boolean addAll(int index, Collection c) throws ClassCastException, IllegalArgumentException, IndexOutOfBoundsException, NullPointerException, UnsupportedOperationException, ConcurrentModificationException
boolean removeAll(Collection c) throws UnsupportedOperationException, ConcurrentModificationException
removeAll
in interface Collection
UnsupportedOperationException
ConcurrentModificationException
boolean retainAll(Collection c) throws UnsupportedOperationException, ConcurrentModificationException
retainAll
in interface Collection
UnsupportedOperationException
ConcurrentModificationException
void clear() throws UnsupportedOperationException
clear
in interface Collection
UnsupportedOperationException
boolean equals(Object o)
Object
equals
in interface Collection
equals
in class Object
int hashCode()
Object
hashCode
in interface Collection
hashCode
in class Object
Object get(int index) throws IndexOutOfBoundsException
IndexOutOfBoundsException
Object set(int index, Object element) throws ClassCastException, IllegalArgumentException, IndexOutOfBoundsException, UnsupportedOperationException
void add(int index, Object element) throws ClassCastException, IllegalArgumentException, IndexOutOfBoundsException, UnsupportedOperationException
Object remove(int index) throws IndexOutOfBoundsException, UnsupportedOperationException
int indexOf(Object o)
int lastIndexOf(Object o)
ListIterator listIterator()
ListIterator listIterator(int index) throws IndexOutOfBoundsException
IndexOutOfBoundsException
List subList(int fromIndex, int toIndex) throws IndexOutOfBoundsException
IndexOutOfBoundsException