Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8001632 Umbrella: Library Lambdafication
  3. JDK-8010122

Add defaults for ConcurrentMap operations to Map

    XMLWordPrintable

Details

    Description

      Add the following new defaults on Map:

          default V putIfAbsent(K key, V value) {
          default boolean remove(Object key, Object value) {
          default boolean replace(K key, V oldValue, V newValue) {
          default V replace(K key, V value) {
          default V computeIfAbsent(K key, Function<? super K, ? extends V> mappingFunction) {
          default V computeIfPresent(K key,
                                     BiFunction<? super K, ? super V, ? extends V> remappingFunction) {
          default V compute(K key,
                            BiFunction<? super K, ? super V, ? extends V> remappingFunction) {
          default V merge(K key, V value,
                          BiFunction<? super V, ? super V, ? extends V> remappingFunction) {

      Also correponding updates in ConcurrentMap.

      Attachments

        Activity

          People

            mduigou Mike Duigou
            briangoetz Brian Goetz
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: