spicyspiders
09/24/2019, 12:26 AMjdelaney
09/24/2019, 1:22 AMtoString
, equals
and hashCode
are always up-to-date. Add a new field? No need to remember to add it to equals
or the other functions, it happen automatically!jdelaney
09/24/2019, 1:24 AMcreated
timestamp on a db object if it's immutableadam-mcneilly
09/24/2019, 2:44 AMcopy()
method you get from data classes.
You shouldn't need to make the properties of your data classes var, when you could just do val newItem = originalItem.copy(changedProperty = 5)
karelpeeters
09/24/2019, 7:03 AMHashMap
and then you mutate a property which causes the hashcode to change the map basically breaks, so you're not allowed to do that.karelpeeters
09/24/2019, 7:04 AMcorneil
09/24/2019, 9:43 AM