code: public final int updateAndGet(T obj, IntUnaryOperator updateFunction) {
          int prev, next;
          do {
              prev = get(obj);
              next = updateFunction.applyAsInt(prev);
          } while (!compareAndSet(obj, prev, next));
          return next;
      }
docs: Atomically updates the field of the given object managed by this updater
  with the results of applying the given function, returning the updated
  value. The function should be side-effect-free, since it may be
  re-applied when attempted updates fail due to contention among threads.
  
  @param obj An object whose field to get and set
  @param updateFunction a side-effect-free function
  @return the updated value
  @since 1.8