Java集合源码学习(23)_Map的子接口ConcurrentMap
来源:互联网 发布:java常用设计模式图解 编辑:程序博客网 时间:2024/05/21 11:23
定义了几个原子的操作方法:
V
putIfAbsent(K key, V value)
If the specified key is not already associated with a value, associate it with the given value.
boolean
remove(Object key, Object value)
Removes the entry for a key only if currently mapped to a given value.
V
replace(K key, V value)
Replaces the entry for a key only if currently mapped to some value.
boolean
replace(K key, V oldValue, V newValue)
Replaces the entry for a key only if currently mapped to a given value.
V
putIfAbsent(K key, V value)
If the specified key is not already associated with a value, associate it with the given value.
boolean
remove(Object key, Object value)
Removes the entry for a key only if currently mapped to a given value.
V
replace(K key, V value)
Replaces the entry for a key only if currently mapped to some value.
boolean
replace(K key, V oldValue, V newValue)
Replaces the entry for a key only if currently mapped to a given value.
0 0
- Java集合源码学习(23)_Map的子接口ConcurrentMap
- Java集合源码学习(21)_Map接口的子接口SortedMap和NavigableMap
- Java集合源码学习(18)_Map接口
- Java集合源码学习(20)_Map接口的实现HashMap
- Java集合源码学习(21)_Map接口子接口SortedMap和NavigableMap
- Java集合源码学习(19)_Map接口的抽象实现AbstractMap
- java--集合--concurrentMap(1.7)
- Java ConcurrentMap 源码分析
- Java类集 _Map 接口的使用注意事项
- Java类集 _Map接口
- Java类集 _Map接口
- java集合(下)_Map集合
- 【JavaSE学习笔记】集合03_Map,集合的嵌套
- Java集合源码学习(6)_List接口的实现_ArrayList_Vector
- Java集合源码学习(7)_List接口的实现_LinkedList
- Java集合源码学习(8)_List接口的实现_CopyOnWriteArrayList
- Java集合源码学习(10)_Set接口的实现HashSet
- Java集合源码学习(11)_Set接口的实现LinkedHashSet
- 点集配准与ICP算法(一)
- linux 下使用SSH 连接远程主机 SCP 拷贝远程文件
- 马士兵struts2视频教程第三十七集
- 2014/8/16
- POJ 1003 Hangover (水题)
- Java集合源码学习(23)_Map的子接口ConcurrentMap
- hdu 4715 素数打表
- structs2处理error的方法
- 包装机有着自己的分类模式
- hdu 动态规划题集
- 我们都要爱
- 自定义表格控件DefinedTable终于发布了,帮助文档也写完了。还支持脚本。
- 水电费十多个的法规的发挥
- iOS 软件一些常用的网站