public int getAndSet (T obj, int newValue)

Atomically sets the field of the given object managed by this updater to the given value and returns the old value.

Parameters:
obj    An object whose field to get and set
newValue    the new value

Returns:  the previous value