aboutsummaryrefslogtreecommitdiff
path: root/src/share/classes/java/util/concurrent
diff options
context:
space:
mode:
authorchegar <none@none>2013-06-05 16:23:23 +0100
committerchegar <none@none>2013-06-05 16:23:23 +0100
commit3a00d3faac93141ac254838d78ea04ca8e7251c3 (patch)
treeb650470146e85fdbebc7747ab0c9edc0e9fb4da1 /src/share/classes/java/util/concurrent
parenta0b298a8e19d22acb14e8d6876907e218aadcbdb (diff)
downloadjdk8u_jdk-3a00d3faac93141ac254838d78ea04ca8e7251c3.tar.gz
8015963: Add at since tags to new ConcurrentHashMap methods
Reviewed-by: shade, martin
Diffstat (limited to 'src/share/classes/java/util/concurrent')
-rw-r--r--src/share/classes/java/util/concurrent/ConcurrentHashMap.java35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/share/classes/java/util/concurrent/ConcurrentHashMap.java b/src/share/classes/java/util/concurrent/ConcurrentHashMap.java
index c8ce136aeb..e62ef35916 100644
--- a/src/share/classes/java/util/concurrent/ConcurrentHashMap.java
+++ b/src/share/classes/java/util/concurrent/ConcurrentHashMap.java
@@ -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 {