JAVA集合
JAVA集合
Java的集合包含了List,Set, Map。其中List,Set继承了Collection接口,而Map单独的一个接口。
关于Collection的文档请参考这里。
Collection介绍
Collection接口是集合框架的基础,所有的实现类都会实现Collection里面的方法。
| 方法 | 解释 |
|---|---|
| int size(); | |
| boolean isEmpty(); | |
| boolean contains(Object o); | |
| Iterator |
|
| Object[] toArray(); | |
| boolean add(E e); | |
| boolean remove(Object o); | |
| boolean containsAll(Collection<?> c); | |
| boolean addAll(Collection<? extends E> c); | |
| boolean removeAll(Collection<?> c); | |
| boolean retainAll(Collection<?> c); | |
| void clear(); | |
| boolean equals(Object o); | |
| int hashCode(); |
posted on 2016-06-08 15:26 walkwalkwalk 阅读(178) 评论(0) 收藏 举报
浙公网安备 33010602011771号