Below is a class that I'm currently working on
@Parcelize
class Time(var hour:Int, var minute:Int):Comparable<Time>,Parcelable
I want to add a setter to member variables hour and minute so that they would stay in time format. And the class has to be passed through intent, so it implements Parcelable. But it says that a Parcelable class should have a primary constructor so I'm having problem with adding setters. Can anyone please tell me why and a solution? Thank you.