@Test public void updateAndGet() { Ref<String> ref = Ref.of("Hello World!"); UIO<String> result = ref.updateAndGet(String::toUpperCase); assertEquals("HELLO WORLD!", result.unsafeRunSync()); }
public UIO<A> updateAndGet(Operator1<A> update) { return UIO.task(() -> value.updateAndGet(update::apply)); }
Ref { public UIO<A> updateAndGet(Operator1<A> update) { return UIO.task(() -> value.updateAndGet(update::apply)); } }
Ref { public UIO<A> updateAndGet(Operator1<A> update) { return UIO.task(() -> value.updateAndGet(update::apply)); } private  Ref(AtomicReference<A> value); }
Ref { public UIO<A> updateAndGet(Operator1<A> update) { return UIO.task(() -> value.updateAndGet(update::apply)); } private  Ref(AtomicReference<A> value); UIO<A> get(); UIO<Unit> set(A newValue); UIO<Unit> lazySet(A newValue); UIO<A> getAndSet(A newValue); UIO<A> updateAndGet(Operator1<A> update); UIO<A> getAndUpdate(Operator1<A> update); static Ref<A> of(A value); @Override String toString(); }
Ref { public UIO<A> updateAndGet(Operator1<A> update) { return UIO.task(() -> value.updateAndGet(update::apply)); } private  Ref(AtomicReference<A> value); UIO<A> get(); UIO<Unit> set(A newValue); UIO<Unit> lazySet(A newValue); UIO<A> getAndSet(A newValue); UIO<A> updateAndGet(Operator1<A> update); UIO<A> getAndUpdate(Operator1<A> update); static Ref<A> of(A value); @Override String toString();  }