static A setVar_returnPrevious(IVar v, A value) { if (v == null) null; synchronized(v) { A prev = v!; v.set(value); ret prev; } }