ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/concurrent/ConcurrentHashMap.java
(Generate patch)

Comparing jsr166/src/main/java/util/concurrent/ConcurrentHashMap.java (file contents):
Revision 1.219 by dl, Sat Jun 1 18:19:08 2013 UTC vs.
Revision 1.220 by jsr166, Wed Jun 5 13:48:59 2013 UTC

# Line 2578 | Line 2578 | public class ConcurrentHashMap<K,V> impl
2578       * from the given type to {@code Boolean.TRUE}.
2579       *
2580       * @return the new set
2581 +     * @since 1.8
2582       */
2583      public static <K> KeySetView<K,Boolean> newKeySet() {
2584          return new KeySetView<K,Boolean>
# Line 2593 | Line 2594 | public class ConcurrentHashMap<K,V> impl
2594       * @throws IllegalArgumentException if the initial capacity of
2595       * elements is negative
2596       * @return the new set
2597 +     * @since 1.8
2598       */
2599      public static <K> KeySetView<K,Boolean> newKeySet(int initialCapacity) {
2600          return new KeySetView<K,Boolean>
# Line 2624 | Line 2626 | public class ConcurrentHashMap<K,V> impl
2626       * there are concurrent insertions or removals.
2627       *
2628       * @return the number of mappings
2629 +     * @since 1.8
2630       */
2631      public long mappingCount() {
2632          long n = sumCount();
# Line 3293 | Line 3296 | public class ConcurrentHashMap<K,V> impl
3296       * @param parallelismThreshold the (estimated) number of elements
3297       * needed for this operation to be executed in parallel
3298       * @param action the action
3299 +     * @since 1.8
3300       */
3301      public void forEach(long parallelismThreshold,
3302                          BiConsumer<? super K,? super V> action) {
# Line 3312 | Line 3316 | public class ConcurrentHashMap<K,V> impl
3316       * for an element, or null if there is no transformation (in
3317       * which case the action is not applied)
3318       * @param action the action
3319 +     * @since 1.8
3320       */
3321      public <U> void forEach(long parallelismThreshold,
3322                              BiFunction<? super K, ? super V, ? extends U> transformer,
# Line 3336 | Line 3341 | public class ConcurrentHashMap<K,V> impl
3341       * result on success, else null
3342       * @return a non-null result from applying the given search
3343       * function on each (key, value), or null if none
3344 +     * @since 1.8
3345       */
3346      public <U> U search(long parallelismThreshold,
3347                          BiFunction<? super K, ? super V, ? extends U> searchFunction) {
# Line 3358 | Line 3364 | public class ConcurrentHashMap<K,V> impl
3364       * @param reducer a commutative associative combining function
3365       * @return the result of accumulating the given transformation
3366       * of all (key, value) pairs
3367 +     * @since 1.8
3368       */
3369      public <U> U reduce(long parallelismThreshold,
3370                          BiFunction<? super K, ? super V, ? extends U> transformer,
# Line 3382 | Line 3389 | public class ConcurrentHashMap<K,V> impl
3389       * @param reducer a commutative associative combining function
3390       * @return the result of accumulating the given transformation
3391       * of all (key, value) pairs
3392 +     * @since 1.8
3393       */
3394      public double reduceToDoubleIn(long parallelismThreshold,
3395                                     ToDoubleBiFunction<? super K, ? super V> transformer,
# Line 3407 | Line 3415 | public class ConcurrentHashMap<K,V> impl
3415       * @param reducer a commutative associative combining function
3416       * @return the result of accumulating the given transformation
3417       * of all (key, value) pairs
3418 +     * @since 1.8
3419       */
3420      public long reduceToLong(long parallelismThreshold,
3421                               ToLongBiFunction<? super K, ? super V> transformer,
# Line 3432 | Line 3441 | public class ConcurrentHashMap<K,V> impl
3441       * @param reducer a commutative associative combining function
3442       * @return the result of accumulating the given transformation
3443       * of all (key, value) pairs
3444 +     * @since 1.8
3445       */
3446      public int reduceToInt(long parallelismThreshold,
3447                             ToIntBiFunction<? super K, ? super V> transformer,
# Line 3450 | Line 3460 | public class ConcurrentHashMap<K,V> impl
3460       * @param parallelismThreshold the (estimated) number of elements
3461       * needed for this operation to be executed in parallel
3462       * @param action the action
3463 +     * @since 1.8
3464       */
3465      public void forEachKey(long parallelismThreshold,
3466                             Consumer<? super K> action) {
# Line 3469 | Line 3480 | public class ConcurrentHashMap<K,V> impl
3480       * for an element, or null if there is no transformation (in
3481       * which case the action is not applied)
3482       * @param action the action
3483 +     * @since 1.8
3484       */
3485      public <U> void forEachKey(long parallelismThreshold,
3486                                 Function<? super K, ? extends U> transformer,
# Line 3493 | Line 3505 | public class ConcurrentHashMap<K,V> impl
3505       * result on success, else null
3506       * @return a non-null result from applying the given search
3507       * function on each key, or null if none
3508 +     * @since 1.8
3509       */
3510      public <U> U searchKeys(long parallelismThreshold,
3511                              Function<? super K, ? extends U> searchFunction) {
# Line 3511 | Line 3524 | public class ConcurrentHashMap<K,V> impl
3524       * @param reducer a commutative associative combining function
3525       * @return the result of accumulating all keys using the given
3526       * reducer to combine values, or null if none
3527 +     * @since 1.8
3528       */
3529      public K reduceKeys(long parallelismThreshold,
3530                          BiFunction<? super K, ? super K, ? extends K> reducer) {
# Line 3533 | Line 3547 | public class ConcurrentHashMap<K,V> impl
3547       * @param reducer a commutative associative combining function
3548       * @return the result of accumulating the given transformation
3549       * of all keys
3550 +     * @since 1.8
3551       */
3552      public <U> U reduceKeys(long parallelismThreshold,
3553                              Function<? super K, ? extends U> transformer,
# Line 3557 | Line 3572 | public class ConcurrentHashMap<K,V> impl
3572       * @param reducer a commutative associative combining function
3573       * @return the result of accumulating the given transformation
3574       * of all keys
3575 +     * @since 1.8
3576       */
3577      public double reduceKeysToDouble(long parallelismThreshold,
3578                                       ToDoubleFunction<? super K> transformer,
# Line 3582 | Line 3598 | public class ConcurrentHashMap<K,V> impl
3598       * @param reducer a commutative associative combining function
3599       * @return the result of accumulating the given transformation
3600       * of all keys
3601 +     * @since 1.8
3602       */
3603      public long reduceKeysToLong(long parallelismThreshold,
3604                                   ToLongFunction<? super K> transformer,
# Line 3607 | Line 3624 | public class ConcurrentHashMap<K,V> impl
3624       * @param reducer a commutative associative combining function
3625       * @return the result of accumulating the given transformation
3626       * of all keys
3627 +     * @since 1.8
3628       */
3629      public int reduceKeysToInt(long parallelismThreshold,
3630                                 ToIntFunction<? super K> transformer,
# Line 3625 | Line 3643 | public class ConcurrentHashMap<K,V> impl
3643       * @param parallelismThreshold the (estimated) number of elements
3644       * needed for this operation to be executed in parallel
3645       * @param action the action
3646 +     * @since 1.8
3647       */
3648      public void forEachValue(long parallelismThreshold,
3649                               Consumer<? super V> action) {
# Line 3645 | Line 3664 | public class ConcurrentHashMap<K,V> impl
3664       * for an element, or null if there is no transformation (in
3665       * which case the action is not applied)
3666       * @param action the action
3667 +     * @since 1.8
3668       */
3669      public <U> void forEachValue(long parallelismThreshold,
3670                                   Function<? super V, ? extends U> transformer,
# Line 3669 | Line 3689 | public class ConcurrentHashMap<K,V> impl
3689       * result on success, else null
3690       * @return a non-null result from applying the given search
3691       * function on each value, or null if none
3692 +     * @since 1.8
3693       */
3694      public <U> U searchValues(long parallelismThreshold,
3695                                Function<? super V, ? extends U> searchFunction) {
# Line 3686 | Line 3707 | public class ConcurrentHashMap<K,V> impl
3707       * needed for this operation to be executed in parallel
3708       * @param reducer a commutative associative combining function
3709       * @return the result of accumulating all values
3710 +     * @since 1.8
3711       */
3712      public V reduceValues(long parallelismThreshold,
3713                            BiFunction<? super V, ? super V, ? extends V> reducer) {
# Line 3708 | Line 3730 | public class ConcurrentHashMap<K,V> impl
3730       * @param reducer a commutative associative combining function
3731       * @return the result of accumulating the given transformation
3732       * of all values
3733 +     * @since 1.8
3734       */
3735      public <U> U reduceValues(long parallelismThreshold,
3736                                Function<? super V, ? extends U> transformer,
# Line 3732 | Line 3755 | public class ConcurrentHashMap<K,V> impl
3755       * @param reducer a commutative associative combining function
3756       * @return the result of accumulating the given transformation
3757       * of all values
3758 +     * @since 1.8
3759       */
3760      public double reduceValuesToDouble(long parallelismThreshold,
3761                                         ToDoubleFunction<? super V> transformer,
# Line 3757 | Line 3781 | public class ConcurrentHashMap<K,V> impl
3781       * @param reducer a commutative associative combining function
3782       * @return the result of accumulating the given transformation
3783       * of all values
3784 +     * @since 1.8
3785       */
3786      public long reduceValuesToLong(long parallelismThreshold,
3787                                     ToLongFunction<? super V> transformer,
# Line 3782 | Line 3807 | public class ConcurrentHashMap<K,V> impl
3807       * @param reducer a commutative associative combining function
3808       * @return the result of accumulating the given transformation
3809       * of all values
3810 +     * @since 1.8
3811       */
3812      public int reduceValuesToInt(long parallelismThreshold,
3813                                   ToIntFunction<? super V> transformer,
# Line 3800 | Line 3826 | public class ConcurrentHashMap<K,V> impl
3826       * @param parallelismThreshold the (estimated) number of elements
3827       * needed for this operation to be executed in parallel
3828       * @param action the action
3829 +     * @since 1.8
3830       */
3831      public void forEachEntry(long parallelismThreshold,
3832                               Consumer<? super Map.Entry<K,V>> action) {
# Line 3818 | Line 3845 | public class ConcurrentHashMap<K,V> impl
3845       * for an element, or null if there is no transformation (in
3846       * which case the action is not applied)
3847       * @param action the action
3848 +     * @since 1.8
3849       */
3850      public <U> void forEachEntry(long parallelismThreshold,
3851                                   Function<Map.Entry<K,V>, ? extends U> transformer,
# Line 3842 | Line 3870 | public class ConcurrentHashMap<K,V> impl
3870       * result on success, else null
3871       * @return a non-null result from applying the given search
3872       * function on each entry, or null if none
3873 +     * @since 1.8
3874       */
3875      public <U> U searchEntries(long parallelismThreshold,
3876                                 Function<Map.Entry<K,V>, ? extends U> searchFunction) {
# Line 3859 | Line 3888 | public class ConcurrentHashMap<K,V> impl
3888       * needed for this operation to be executed in parallel
3889       * @param reducer a commutative associative combining function
3890       * @return the result of accumulating all entries
3891 +     * @since 1.8
3892       */
3893      public Map.Entry<K,V> reduceEntries(long parallelismThreshold,
3894                                          BiFunction<Map.Entry<K,V>, Map.Entry<K,V>, ? extends Map.Entry<K,V>> reducer) {
# Line 3881 | Line 3911 | public class ConcurrentHashMap<K,V> impl
3911       * @param reducer a commutative associative combining function
3912       * @return the result of accumulating the given transformation
3913       * of all entries
3914 +     * @since 1.8
3915       */
3916      public <U> U reduceEntries(long parallelismThreshold,
3917                                 Function<Map.Entry<K,V>, ? extends U> transformer,
# Line 3905 | Line 3936 | public class ConcurrentHashMap<K,V> impl
3936       * @param reducer a commutative associative combining function
3937       * @return the result of accumulating the given transformation
3938       * of all entries
3939 +     * @since 1.8
3940       */
3941      public double reduceEntriesToDouble(long parallelismThreshold,
3942                                          ToDoubleFunction<Map.Entry<K,V>> transformer,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines