List ( interface ) 方法 总结:
1. void add(int index, E element){}; 在指定位置插入E。
2. Boolean add(E e){}; 添加特定元素到表尾。
3. Boolean addAll(Collection<? extends E> C) {};在表尾添加指定集合中的所有元素。
4. Boolean addAll(int index, Collection<? extends E> C){}; 在指定位置添加所有集合中的元素。
5. void clear(){}; 移除所有表中的元素。
6. Boolean contains(Object obj){}; 如果此表中包含指定元素obj,返回true。
7. Boolean containsAll(<Collection C ?> C){}; 如果此表中包含指定Collection中所有元素,返回true。
8. Boolean equals(Object obj){}; 如果与指定元素obj相等,返回true。
9. E get(int index){};获得指定位置的元素。
10. int hashcode(){};返回此表的哈希值。
11. int indexOf(Object obj){}; 如果此表中不包含指定元素obj,返回-1,或者返回第一次出现指定元素的索引列表。
12. Boolean isEmpty(){}; 如果此表中无任何元素,返回true。
13. int LastIndexOf(Object obj){}; 返回指定元素最后一次出现的位置。
14. Boolean remove(Object obj){};移除第一次出现指定位置元素并返回true(前提:该元素本就存在)
15. Boolean removeAll(Collection<?> C){}; 移除指定的Collection中所有的元素。
16. Boolean retainAll(Collection<?> C){};只保留指定集合中的所有元素。
17. int size(){};返回此表 中的元素个数。
18. List<E> subList(int fromIndex, int toIndex){};返回从fromIndex索引到toIndex 的子列表。
19. Object[] toArray(){}; 以正确序列返回所有列表中的元素。