Could you please help me to grasp the gist of some methods of AtomicInteger class: updateAndGet
, accumulateAndGet
.
Why the first one recieves IntUnaryOperator
as a parameter? What logic can potentially be applied in functional method of this interface? My thoughts, it would be easier to recieve just plain int
value. (Same with IntBinaryOperator
interface).
Thanks in advance.