autoClone

open fun autoClone(): T

Similar to lock except that mutations cause a clone operation to happen before the mutation resulting in all methods returning a new Object and leaving the original locked object unmodified.

Auto clone is not retained by cloned objects returned from mutations. The cloned objects are mutable and are not locked.