
public interface List extends Collection 接口
List 方法区:
int size();
boolean isEmpty();
boolean contains(Object o);
1 2
|
boolean contains(Object o);
|
Iterator iterator();
1 2
|
Iterator<E> iterator();
|
Object[] toArray();
T[] toArray(T[] a);
1 2
|
<T> T[] toArray(T[] a);
|
boolean add(E e);
boolean remove(Object o);
1 2
|
boolean remove(Object o);
|
boolean containsAll(Collection<?> c);
1 2
|
boolean containsAll(Collection<?> c);
|
boolean addAll(int index, Collection<? extends E> c);
1 2
|
boolean addAll(int index, Collection<? extends E> c);
|
boolean removeAll(Collection<?> c);
1 2
|
boolean removeAll(Collection<?> c);
|
boolean retainAll(Collection<?> c);
1 2
|
boolean retainAll(Collection<?> c);
|
void clear();
boolean equals(Object o);
1 2
|
boolean equals(Object o);
|
int hashCode();
E get(int index);
E set(int index, E element);
1 2
|
E set(int index, E element);
|
E remove(int index);
int indexOf(Object o);
1 2
|
int indexOf(Object o);
|
int lastIndexOf(Object o);
1 2
|
int lastIndexOf(Object o);
|
ListIterator listIterator();
1 2
|
ListIterator<E> listIterator();
|
ListIterator listIterator(int index);
1 2
|
ListIterator<E> listIterator(int index);
|
List subList(int fromIndex, int toIndex);
1 2
|
List<E> subList(int fromIndex, int toIndex);
|
近期评论