java中commons意思_JAVA中commons-collections-3.2.1.jar包是干什么用的?

本文详细介绍了Apache Commons-Collections库,该库为Java集合框架提供了扩展接口、实现和实用工具。主要内容包括:Bag接口用于存储多个相同对象;Buffer接口定义了如FIFO等有序集合;BidiMap实现了双向映射;MapIterator简化了映射迭代;类型检查装饰器确保集合中元素类型的统一;转换装饰器允许在添加到集合前修改每个对象;组合集合将多个集合统一管理;有序映射和集合保持元素添加顺序;基于身份比较的映射;引用映射支持垃圾回收;以及多种比较器和迭代器实现。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

满意答案

02ae427d08e371d7e90d5b995e828d6d.png

zhong789789

2013.06.19

02ae427d08e371d7e90d5b995e828d6d.png

采纳率:54%    等级:13

已帮助:8934人

Commons项目组中的一个各种集合类和集合工具类的封装

Commons-Collections seek to build upon the JDK classes by providing new interfaces, implementations and utilities.There are many features, including:Bag interface for collections that have a number of copies of each objectBuffer interface for collections that have a well defined removal order, like FIFOsBidiMap interface for maps that can be looked up from value to key as well and key to valueMapIterator interface to provide simple and quick iteration over mapsType checking decorators to ensure that only instances of a certain type can be addedTransforming decorators that alter each object as it is added to the collectionComposite collections that make multiple collections look like oneOrdered maps and sets that retain the order elements are added in, including an LRU based mapIdentity map that compares objects based on their identity (==) instead of the equals methodReference map that allows keys and/or values to be garbage collected under close controlMany comparator implementationsMany iterator implementationsAdapter classes from array and enumerations to collectionsUtilities to test or create typical set-theory properties of collections such as union, intersection, and closure类似C++中的Boost库,对Java容器类型和算法的补充

04分享举报

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值