(java 往日的翻译) Commons-Collection介绍。

访问量: 969

为了得到一个简单的显示Map内容的方法,找了一早上。

国内的牛人很多,但是很少有Open-Doc精神的作者。感慨下。

Commons Collections
The Java Collections Framework was a major addition in JDK 1.2. It added many powerful data structures that accelerate
development of most significant Java applications. Since that time it has become the recognised standard for collection
handling in Java.
Java Collections Framework是对JDK1。2的补充。增加了很多可以加快开发速度的数据结构。从那时起它就被认为是处理集合的标准。
Commons-Collections seek to build upon the JDK classes by providing new interfaces, implementations and utilities. There are
many features, including:
Commons-Collections 通过增加新的接口,实现类和工具类来完善JDK. 它有很多特性,包括:
* Bag interface for collections that have a number of copies of each object
Bag接口,可以为每个对象提供若干数量的COPY。
* Buffer interface for collections that have a well defined removal order, like FIFOs
Buffer接口,包含被良好定义的移除顺序,例如FIFO(先进先出)算法
* BidiMap interface for maps that can be looked up from value to key as well and key to value
BidiMap接口,可以从value查找到key,跟官方指定的从key查找到value的用法一样。
* MapIterator interface to provide simple and quick iteration over maps
MapIterator接口,提供简单而快速的对map的遍历。
* Type checking decorators to ensure that only instances of a certain type can be added
类型检查修饰器,可以保证只有某个类型的实例才能被添加到已有集合中。
* Transforming decorators that alter each object as it is added to the collection
没看明白,哪个高手解释下?
转换修饰器,转换每个对象,并把它放到集合中
* Composite collections that make multiple collections look like one
组合型集合,可以让多个集合看起来象是一个。
* Ordered maps and sets that retain the order elements are added in, including an LRU based map
已排序Map和Set: 保留了元素被增加进来的顺序,包含了一个基于LRU算法的MAP(Least Recently Used. 最近最少使用算法)
* Identity map that compares objects based on their identity (==) instead of the equals method
Identity Map, 使用 相等符号("==")来比较对象,而不是"equals".
* Reference map that allows keys and/or values to be garbage collected under close control
Reference Map允许 在封闭控制下产生的无用的 键或者值
* Many comparator implementations
很多comparator的实现
* Many iterator implementations
很多iterator的实现。
* Adapter classes from array and enumerations to collections
从数组和枚举到 集合的 Adapter.
* Utilities to test or create typical set-theory properties of collections such as union, intersection, and closure
提供了这样的工具:可以测试或产生集合论中典型的collections的属性,如 或,与,闭包

订阅/RSS Feed

Subscribe

分类/category