Apache Commons Collections组件介绍使用
来源:互联网 发布:三国之数据辅助 编辑:程序博客网 时间:2024/06/02 06:46
Commons Collections组件介绍使用
介绍
其实Java JDK已经提供了丰富的集合操作,但是在某些场合下,可能无法满足,apache commons组件提供了更加丰富的集数据结构。其实collections下实现的数据结构都是基于JDK已有数据结构的扩展和补充,掌握好JDK的基础集合框架才是重点。
如果在新项目中药使用集合扩展组件,我推荐使用google guava或不适用扩展组件,我觉得没必要。Apache Commons Collection从4.0才开始支持泛型,并且Collections并没有完全符合JDK约定,所以个人并不推荐。
接口介绍
Bag接口 Bag数据结构最主要的特点就是,其维护了每个元素的出现的次数,其底层是使用Map来实现的。 注意Bag接口中的一些方法是不符合java Collection的约定的 HashBag实现 其底层是基于HashMap实现 TreeBag实现 其底层是基于TreeMap实现
BidiMap接口 允许键值双向查找的接口
...以及JDK集合数据结构对应的接口变种
总结
commons collections下的各种集合数据结构非常多,我觉得要熟练掌握并没有必要,不过好好看看其源码倒是不错。
0 0
- Apache Commons Collections组件介绍使用
- Apache Commons IO组件介绍使用
- Apache Commons Email组件介绍使用
- Apache Commons Codec组件介绍使用
- Apache Commons BeanUtils组件介绍使用
- Apache Commons lang组件介绍使用
- Apache Commons IO组件介绍使用
- Apache commons组件的使用
- commons-collections使用介绍之Bag
- commons-collections使用介绍之List
- commons-collections使用介绍之Map
- commons-collections使用介绍之Bag HashBag
- apache commons collections
- apache commons collections
- Apache Commons Collections
- Apache Commons Collections
- Apache Commons Collections使用方法
- Apache Commons Collections
- Android中的指纹识别
- 【Linux开发】如何在./configure的时候将编译参数传入,改变默认的编译器gcc成arm-linux-gcc
- 三十六计
- 【笔记】汉诺塔问题及python实现
- Tomcat设置角色和密码
- Apache Commons Collections组件介绍使用
- Golang中的tag
- 第一个Windows程序,Hello,world!
- 【leetcode】Missing Number
- Cuda里面的Texture Memory
- javaee之Spring的AOP案例
- 多态的好处
- 多表查询
- LintCode-第55题 比较字符串