All Superinterfaces:
Collection<E>, Iterable<E>
增
add(E e)
向末尾添加
add(int index, E element)
向第index个添加
addAll(Collection<? extends E> c)
向末尾添加collections
addAll(int index, Collection<? extends E> c)
。
删
clear() 。
remove(index)。
remove(Object o) 删掉第一个o
remove(collections)。
retainAll(Collection<?> c)。
留下c中出现的,删掉其余
改
set(int index, E element)。
查
get(index)。
iterator()返回iterator
indexOf(Object o)
lastIndexOf(Object o)
contains(Object o)
containsAll(Collection<?> c)
状态操作
size()
isEmpty()
自身变化
sort(Comparator<? super E> c)
subList(int fromIndex, int toIndex)
toArray(T[] a) 参数是一个数组对象,前面要强转