<kotlin - how to override hashcode> I have overrid...
# stackoverflow
u
kotlin - how to override hashcode I have overrided the equals method of a java object. (actually the objects in kotlin but its easily understood im just overriding the equals method). but now inorder to maintain the equals contract i should also override the hashcode method. but im not sure how to put in a implementation for hashcode that suits the equals method. here is what i have so far: data class AddressModel( var id_address: Int = 0, var id_country: Int = 0, ) { override fun equals(other:...