有什么可以替代 SequencedHashMap

jspxnet 2005-09-16 10:54:59
apache 包下有个 org.apache.commons.collections.SequencedHashMap
SequencedHashMap是一个按照键值对插入顺序序列化的Map实现,能安放进去的排序取出来.

但现在已经不推荐使用这个类,有没有其他的替代类可以使用
...全文
119 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
treeroot 2005-09-18
  • 打赏
  • 举报
回复
LinkedHashMap
humanity 2005-09-17
  • 打赏
  • 举报
回复
上面短篇小说写得好。
fox_blue 2005-09-16
  • 打赏
  • 举报
回复
org.apache.commons.collections
Class SequencedHashMap
java.lang.Object
|
+--org.apache.commons.collections.SequencedHashMap
All Implemented Interfaces:
java.lang.Cloneable, java.io.Externalizable, java.util.Map, java.io.Serializable
Direct Known Subclasses:
LRUMap

--------------------------------------------------------------------------------
Deprecated. Replaced by LinkedMap and ListOrderedMap in map subpackage. Due to be removed in v4.0.

public class SequencedHashMap
extends java.lang.Object
implements java.util.Map, java.lang.Cloneable, java.io.Externalizable
A map of objects whose mapping entries are sequenced based on the order in which they were added. This data structure has fast O(1) search time, deletion time, and insertion time.

Although this map is sequenced, it cannot implement List because of incompatible interface definitions. The remove methods in List and Map have different return values (see: List.remove(Object) and Map.remove(Object)).

This class is not thread safe. When a thread safe implementation is required, use Collections.synchronizedMap(Map) as it is documented, or use explicit synchronization controls.



Since:
Commons Collections 2.0
Version:
$Revision: 1.28 $ $Date: 2004/02/18 01:15:42 $
Author:
Michael A. Smith, Daniel Rall, Henning P. Schmiedehausen, Stephen Colebourne
See Also:
LinkedMap, ListOrderedMap, Serialized Form
findfeels 2005-09-16
  • 打赏
  • 举报
回复
学习中

62,614

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧