登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

Code@Pig Home

喜欢背着一袋Code傻笑的Pig .. 忧美.欢笑.记忆.忘却 .之. 角落

 
 
 

日志

 
 

[java] Collections Framework  

2009-06-20 12:53:37|  分类: lang_java |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |
所谓 collections framework 就是 java.util, java.util.concurrent 里面的一堆容器类。

[java] Collections Framework - kasicass - Code@Pig Home

------------------------
java.util.Collection, 除了 Map 外,所有其他容器的基类。所有容器接口可分为四类:

== Adding Elements ==
boolean add(E e);
boolean addAll(Collection<? extrends E> c);

== Removing Elements ==
boolean remove(Object o);
void clear();                // remove all elements
boolean removeAll(Collection<?> c);    // remove the elements in c
boolean retainAll(Collection<?> c);    // remove the elements *not* in c

== Querying the Contents of a Collection ==
boolean contains(Object o);        // true if o is present
boolean containsAll(Collection<?> c);    // true if all elements of c are in the collection
boolean isEmpty();
int size();               

== Making a Collection's Contents Available for Further Processing ==
Iterator<E> iterator();
Object[] toArray();            // copy contents to an Object[]
<T> T[] toArray(T[] t);            // copy contents to a T[] (for any T), 这个是个奇怪的接口

  评论这张
 
阅读(751)| 评论(0)

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2018