deepCopy

abstract fun deepCopy(retainUuid: Boolean = false): State(source)

Returns a deep copy, retaining the uuid if and only if retainUuid is true.

Fields annotated with Transient are shallow-copied.

See also

State.deepCopyTransient

utility function for subclasses that want to implement deepCopy