Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
ceeda996
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
ceeda996
编写于
6月 05, 2013
作者:
C
chegar
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8015963: Add at since tags to new ConcurrentHashMap methods
Reviewed-by: shade, martin
上级
4b9cd322
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
35 addition
and
0 deletion
+35
-0
src/share/classes/java/util/concurrent/ConcurrentHashMap.java
...share/classes/java/util/concurrent/ConcurrentHashMap.java
+35
-0
未找到文件。
src/share/classes/java/util/concurrent/ConcurrentHashMap.java
浏览文件 @
ceeda996
...
...
@@ -2610,6 +2610,7 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
* from the given type to {@code Boolean.TRUE}.
*
* @return the new set
* @since 1.8
*/
public
static
<
K
>
KeySetView
<
K
,
Boolean
>
newKeySet
()
{
return
new
KeySetView
<
K
,
Boolean
>
...
...
@@ -2625,6 +2626,7 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
* @throws IllegalArgumentException if the initial capacity of
* elements is negative
* @return the new set
* @since 1.8
*/
public
static
<
K
>
KeySetView
<
K
,
Boolean
>
newKeySet
(
int
initialCapacity
)
{
return
new
KeySetView
<
K
,
Boolean
>
...
...
@@ -2662,6 +2664,7 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
* there are concurrent insertions or removals.
*
* @return the number of mappings
* @since 1.8
*/
public
long
mappingCount
()
{
long
n
=
sumCount
();
...
...
@@ -3331,6 +3334,7 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
* @param parallelismThreshold the (estimated) number of elements
* needed for this operation to be executed in parallel
* @param action the action
* @since 1.8
*/
public
void
forEach
(
long
parallelismThreshold
,
BiConsumer
<?
super
K
,?
super
V
>
action
)
{
...
...
@@ -3350,6 +3354,7 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
* for an element, or null if there is no transformation (in
* which case the action is not applied)
* @param action the action
* @since 1.8
*/
public
<
U
>
void
forEach
(
long
parallelismThreshold
,
BiFunction
<?
super
K
,
?
super
V
,
?
extends
U
>
transformer
,
...
...
@@ -3374,6 +3379,7 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
* result on success, else null
* @return a non-null result from applying the given search
* function on each (key, value), or null if none
* @since 1.8
*/
public
<
U
>
U
search
(
long
parallelismThreshold
,
BiFunction
<?
super
K
,
?
super
V
,
?
extends
U
>
searchFunction
)
{
...
...
@@ -3396,6 +3402,7 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
* @param reducer a commutative associative combining function
* @return the result of accumulating the given transformation
* of all (key, value) pairs
* @since 1.8
*/
public
<
U
>
U
reduce
(
long
parallelismThreshold
,
BiFunction
<?
super
K
,
?
super
V
,
?
extends
U
>
transformer
,
...
...
@@ -3420,6 +3427,7 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
* @param reducer a commutative associative combining function
* @return the result of accumulating the given transformation
* of all (key, value) pairs
* @since 1.8
*/
public
double
reduceToDoubleIn
(
long
parallelismThreshold
,
ToDoubleBiFunction
<?
super
K
,
?
super
V
>
transformer
,
...
...
@@ -3445,6 +3453,7 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
* @param reducer a commutative associative combining function
* @return the result of accumulating the given transformation
* of all (key, value) pairs
* @since 1.8
*/
public
long
reduceToLong
(
long
parallelismThreshold
,
ToLongBiFunction
<?
super
K
,
?
super
V
>
transformer
,
...
...
@@ -3470,6 +3479,7 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
* @param reducer a commutative associative combining function
* @return the result of accumulating the given transformation
* of all (key, value) pairs
* @since 1.8
*/
public
int
reduceToInt
(
long
parallelismThreshold
,
ToIntBiFunction
<?
super
K
,
?
super
V
>
transformer
,
...
...
@@ -3488,6 +3498,7 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
* @param parallelismThreshold the (estimated) number of elements
* needed for this operation to be executed in parallel
* @param action the action
* @since 1.8
*/
public
void
forEachKey
(
long
parallelismThreshold
,
Consumer
<?
super
K
>
action
)
{
...
...
@@ -3507,6 +3518,7 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
* for an element, or null if there is no transformation (in
* which case the action is not applied)
* @param action the action
* @since 1.8
*/
public
<
U
>
void
forEachKey
(
long
parallelismThreshold
,
Function
<?
super
K
,
?
extends
U
>
transformer
,
...
...
@@ -3531,6 +3543,7 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
* result on success, else null
* @return a non-null result from applying the given search
* function on each key, or null if none
* @since 1.8
*/
public
<
U
>
U
searchKeys
(
long
parallelismThreshold
,
Function
<?
super
K
,
?
extends
U
>
searchFunction
)
{
...
...
@@ -3549,6 +3562,7 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
* @param reducer a commutative associative combining function
* @return the result of accumulating all keys using the given
* reducer to combine values, or null if none
* @since 1.8
*/
public
K
reduceKeys
(
long
parallelismThreshold
,
BiFunction
<?
super
K
,
?
super
K
,
?
extends
K
>
reducer
)
{
...
...
@@ -3571,6 +3585,7 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
* @param reducer a commutative associative combining function
* @return the result of accumulating the given transformation
* of all keys
* @since 1.8
*/
public
<
U
>
U
reduceKeys
(
long
parallelismThreshold
,
Function
<?
super
K
,
?
extends
U
>
transformer
,
...
...
@@ -3595,6 +3610,7 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
* @param reducer a commutative associative combining function
* @return the result of accumulating the given transformation
* of all keys
* @since 1.8
*/
public
double
reduceKeysToDouble
(
long
parallelismThreshold
,
ToDoubleFunction
<?
super
K
>
transformer
,
...
...
@@ -3620,6 +3636,7 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
* @param reducer a commutative associative combining function
* @return the result of accumulating the given transformation
* of all keys
* @since 1.8
*/
public
long
reduceKeysToLong
(
long
parallelismThreshold
,
ToLongFunction
<?
super
K
>
transformer
,
...
...
@@ -3645,6 +3662,7 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
* @param reducer a commutative associative combining function
* @return the result of accumulating the given transformation
* of all keys
* @since 1.8
*/
public
int
reduceKeysToInt
(
long
parallelismThreshold
,
ToIntFunction
<?
super
K
>
transformer
,
...
...
@@ -3663,6 +3681,7 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
* @param parallelismThreshold the (estimated) number of elements
* needed for this operation to be executed in parallel
* @param action the action
* @since 1.8
*/
public
void
forEachValue
(
long
parallelismThreshold
,
Consumer
<?
super
V
>
action
)
{
...
...
@@ -3683,6 +3702,7 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
* for an element, or null if there is no transformation (in
* which case the action is not applied)
* @param action the action
* @since 1.8
*/
public
<
U
>
void
forEachValue
(
long
parallelismThreshold
,
Function
<?
super
V
,
?
extends
U
>
transformer
,
...
...
@@ -3707,6 +3727,7 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
* result on success, else null
* @return a non-null result from applying the given search
* function on each value, or null if none
* @since 1.8
*/
public
<
U
>
U
searchValues
(
long
parallelismThreshold
,
Function
<?
super
V
,
?
extends
U
>
searchFunction
)
{
...
...
@@ -3724,6 +3745,7 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
* needed for this operation to be executed in parallel
* @param reducer a commutative associative combining function
* @return the result of accumulating all values
* @since 1.8
*/
public
V
reduceValues
(
long
parallelismThreshold
,
BiFunction
<?
super
V
,
?
super
V
,
?
extends
V
>
reducer
)
{
...
...
@@ -3746,6 +3768,7 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
* @param reducer a commutative associative combining function
* @return the result of accumulating the given transformation
* of all values
* @since 1.8
*/
public
<
U
>
U
reduceValues
(
long
parallelismThreshold
,
Function
<?
super
V
,
?
extends
U
>
transformer
,
...
...
@@ -3770,6 +3793,7 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
* @param reducer a commutative associative combining function
* @return the result of accumulating the given transformation
* of all values
* @since 1.8
*/
public
double
reduceValuesToDouble
(
long
parallelismThreshold
,
ToDoubleFunction
<?
super
V
>
transformer
,
...
...
@@ -3795,6 +3819,7 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
* @param reducer a commutative associative combining function
* @return the result of accumulating the given transformation
* of all values
* @since 1.8
*/
public
long
reduceValuesToLong
(
long
parallelismThreshold
,
ToLongFunction
<?
super
V
>
transformer
,
...
...
@@ -3820,6 +3845,7 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
* @param reducer a commutative associative combining function
* @return the result of accumulating the given transformation
* of all values
* @since 1.8
*/
public
int
reduceValuesToInt
(
long
parallelismThreshold
,
ToIntFunction
<?
super
V
>
transformer
,
...
...
@@ -3838,6 +3864,7 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
* @param parallelismThreshold the (estimated) number of elements
* needed for this operation to be executed in parallel
* @param action the action
* @since 1.8
*/
public
void
forEachEntry
(
long
parallelismThreshold
,
Consumer
<?
super
Map
.
Entry
<
K
,
V
>>
action
)
{
...
...
@@ -3856,6 +3883,7 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
* for an element, or null if there is no transformation (in
* which case the action is not applied)
* @param action the action
* @since 1.8
*/
public
<
U
>
void
forEachEntry
(
long
parallelismThreshold
,
Function
<
Map
.
Entry
<
K
,
V
>,
?
extends
U
>
transformer
,
...
...
@@ -3880,6 +3908,7 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
* result on success, else null
* @return a non-null result from applying the given search
* function on each entry, or null if none
* @since 1.8
*/
public
<
U
>
U
searchEntries
(
long
parallelismThreshold
,
Function
<
Map
.
Entry
<
K
,
V
>,
?
extends
U
>
searchFunction
)
{
...
...
@@ -3897,6 +3926,7 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
* needed for this operation to be executed in parallel
* @param reducer a commutative associative combining function
* @return the result of accumulating all entries
* @since 1.8
*/
public
Map
.
Entry
<
K
,
V
>
reduceEntries
(
long
parallelismThreshold
,
BiFunction
<
Map
.
Entry
<
K
,
V
>,
Map
.
Entry
<
K
,
V
>,
?
extends
Map
.
Entry
<
K
,
V
>>
reducer
)
{
...
...
@@ -3919,6 +3949,7 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
* @param reducer a commutative associative combining function
* @return the result of accumulating the given transformation
* of all entries
* @since 1.8
*/
public
<
U
>
U
reduceEntries
(
long
parallelismThreshold
,
Function
<
Map
.
Entry
<
K
,
V
>,
?
extends
U
>
transformer
,
...
...
@@ -3943,6 +3974,7 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
* @param reducer a commutative associative combining function
* @return the result of accumulating the given transformation
* of all entries
* @since 1.8
*/
public
double
reduceEntriesToDouble
(
long
parallelismThreshold
,
ToDoubleFunction
<
Map
.
Entry
<
K
,
V
>>
transformer
,
...
...
@@ -3968,6 +4000,7 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
* @param reducer a commutative associative combining function
* @return the result of accumulating the given transformation
* of all entries
* @since 1.8
*/
public
long
reduceEntriesToLong
(
long
parallelismThreshold
,
ToLongFunction
<
Map
.
Entry
<
K
,
V
>>
transformer
,
...
...
@@ -3993,6 +4026,7 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
* @param reducer a commutative associative combining function
* @return the result of accumulating the given transformation
* of all entries
* @since 1.8
*/
public
int
reduceEntriesToInt
(
long
parallelismThreshold
,
ToIntFunction
<
Map
.
Entry
<
K
,
V
>>
transformer
,
...
...
@@ -4168,6 +4202,7 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
* {@link #keySet(Object) keySet(V)},
* {@link #newKeySet() newKeySet()},
* {@link #newKeySet(int) newKeySet(int)}.
* @since 1.8
*/
public
static
class
KeySetView
<
K
,
V
>
extends
CollectionView
<
K
,
V
,
K
>
implements
Set
<
K
>,
java
.
io
.
Serializable
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录