public interface List<E> extends Collection<E> {//有序队列 jdk:1.7 java.util
int size();//返回列表中的元素数
boolean isEmpty();//是否包含元素
boolean contains(Object o);//是否包含指定的元素
Iterator<E> iterator();//获取迭代器
Object[] toArray();//返回数组
<T> T[] toArray(T[] a);//返回数组,保留类型
boolean add(E e);//向列表的尾部添加指定的元素
boolean remove(Object o);//从此列表中移除第一次出现的指定元素
boolean containsAll(Collection<?> c);//列表石是否包含指定 c中所有元素
boolean addAll(Collection<? extends E> c);//添加指定 collection 中的所有元素到此列表的结尾
boolean addAll(int index, Collection<? extends E> c);//将指定 collection 中的所有元素都插入到列表中的指定位置
boolean removeAll(Collection<?> c);//从列表中移除指定 collection 中包含的其所有元素
boolean retainAll(Collection<?> c);//仅在列表中保留指定 collection 中所包含的元素
void clear();//清空
boolean equals(Object o);//比较指定的对象与列表是否相等
int hashCode();//返回列表的哈希码值
E get(int index);//返回列表中指定位置的元素
E set(int index, E element);//用指定元素替换列表中指定位置的元素
void add(int index, E element);//在列表的指定位置插入指定元素
E remove(int index);//移除列表中指定位置的元素
int indexOf(Object o);//返回此列表中第一次出现的指定元素的索引
int lastIndexOf(Object o);//返回此列表中最后出现的指定元素的索引
ListIterator<E> listIterator();//返回此列表元素的列表迭代器(按适当顺序)
ListIterator<E> listIterator(int index);//返回列表中元素的列表迭代器(按适当顺序),从列表的指定位置开始
List<E> subList(int fromIndex, int toIndex);
}
public interface Set<E> extends Collection<E> {//不允许有重复元素 jdk1.7 java.util
int size();//set 中的元素数
boolean isEmpty();//如果set不包含元素,则返回 true。
boolean contains(Object o);//是否包含指定的元素
Iterator<E> iterator();//获取迭代器
Object[] toArray();//返回数组
<T> T[] toArray(T[] a);//返回数组,保留类型
boolean add(E e);//如果 set中尚未存在指定的元素,则添加此元素
boolean remove(Object o);//如果 set中存在指定的元素,则将其移除
boolean containsAll(Collection<?> c);//如果此 set 包含指定 collection的所有元素,则返回 true
boolean addAll(Collection<? extends E> c);//如果 set 中没有指定 collection中的所有元素,则将其添加到此 set中
boolean retainAll(Collection<?> c);//仅保留 set中那些包含在指定 collection 中的元素
boolean removeAll(Collection<?> c);//移除 set中那些包含在指定 collection 中的元素
void clear();//清空
boolean equals(Object o);//比较指定对象与此 set 的相等性
int hashCode();//返回 set 的哈希码值
}