public final V getAndSet(V newValue) {while (true) {V x = get();if (compareAndSet(x, newValue))return x;}}
public V getAndSet(V newValue){while(true) {V x = get ();if (compareAndSet(x, newValue))return x;}}