标签:style http io os java ar 2014 sp cti
集合
1.整体继承关系图:

2.Collection接口详解:
①构造方法:有一个带有一个集合参数的构造方法。
List<String> list=new ArrayList<String>(a);
a是一个List、Set、或另外一种Collection,list对象中包含了a中所有元素,即所谓的转换构造方法。
②定义:
public interface Collection<E> extends Iterable<E> {
//基本操作
int size();
boolean isEmpty();
boolean contains(Object o);
boolean add(E e);
boolean remove(Object o);
Iterator<E> iterator();
//批量操作
boolean containsAll(Collection<?> c);
boolean addAll(Collection<? extends E> c);
boolean removeAll(Collection<?> c);
boolean retainAll(Collection<?> c);
void clear();
//数组操作
Object[] toArray();
<T> T[] toArray(T[] a);
}
标签:style http io os java ar 2014 sp cti
原文地址:http://my.oschina.net/u/1415486/blog/313024