2
Doubts about the methods replace
: compute
: computeIfAbsent
: computeIfPresent
:forEach
(briefly all who make use of the function
or biFuntion
within the input parameter)
- The
replace
is it really necessary? this is me whenever I wanted to replace aValue
of aKey
I was doing theput
, as the key was the same map itself replaced. With this implementation I may have problems? forEach
I know it serves to go through the map doing actions but how I implement the input parameter(according to the documentationBiConsumer<? super K,? super V> action
) may pass an example?- The
compute
:computeIfAbsent
:computeIfPresent
I couldn’t figure out what they serve to give an example of use?