yup, immutable data classes are sweet, especially with kotlin's named arguments but they become pain in the a** when using from java where you cant easily use
copy()
😞
a
Andreas Sinz
08/16/2018, 7:45 PM
You could create your own version:
Copy code
class Person(val name: String) {
val updated = Instant.now()
@JvmOverloads
fun copy(name: String = this.name) = Person(name)
}