is there a good way to return a copy of an object ...
# getting-started
j
is there a good way to return a copy of an object when using a data class setter? similar to the way string.replace() returns a new string in java? we have many container classes and I don't really want the caller of an object setter to have to use copy() every time it sets a property value.