title: Get the updated value first in AtomicBoolean
body: <p><code>getAndSet</code> returns the "previous" value then set the updated value, I want the "reverse" behavior, to return the updated value and then set it in the <code>AtomicBoolean</code> object.
  just like when you do </p>
  
  <pre><code>if(bolVal = otherBolVal)
  </code></pre>
  
  <p>the assignment here precedes the evaluation.
  can it be done with <code>AtomicBoolean</code> alone or do I need a custom class which is not good for me.</p>
  
  <p>I had this</p>
  
  <pre><code>sharedPref.edit().putBoolean("tag", isOvertime = false).apply();
  </code></pre>
  
  <p>which was done in one line, now I was forced to pass the boolean as a mutable object so I didn't want to create a custom class and went for AtomicBoolean.
  now I'm looking for a way to do the same one line assignment with least efforts without creating a new class or an extra line expression.</p>