Skip to content

Commit 78b68a8

Browse files
committed
doc update
1 parent 060191d commit 78b68a8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ and enters it into this map unless null.
6565
**returns** the current (existing or computed) value associated with
6666
the specified key, or null if the computed value is null
6767

68-
**Remark**: putIfAbsent(1, null) will NOT add an entry (supposing 1 is absent)
68+
**Remark**: `putIfAbsent(1, null)` will NOT add an entry (supposing 1 is absent)
6969

7070
* `putIfAbsent` vs `computeIfAbsent`: [stackoverflow differences](https://stackoverflow.com/a/48184207)
7171
* different returns,
@@ -81,6 +81,8 @@ Replaces each entry's value with the result of invoking the given
8181
function on that entry until all entries have been processed or the
8282
function throws an exception
8383

84+
**Remark**: Can't change the element type. To do that - use a stream.
85+
8486
* `default boolean replace(K key, V oldValue, V newValue)` - Replaces the
8587
entry for the specified key only if currently mapped to the specified value.
8688
* `default V replace(K key, V value)` - Replaces the entry for the

0 commit comments

Comments
 (0)