Added the AtomicReference.apply method