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> |
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> |
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(); |
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) { |
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, |
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) { |
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, |
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, |
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, |
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, |
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) { |
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, |
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) { |
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) { |
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, |
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, |
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, |
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, |
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) { |
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, |
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) { |
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) { |
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, |
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, |
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, |
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, |
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) { |
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, |
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) { |
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) { |
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, |
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, |