nestserau
11/12/2018, 4:01 PMMonday(1), Tuesday(2), etc.
So from 1 I need to get a Monday instance. I understand that a factory can be declared as a companion object. But then I need to set a requirement for a certain companion object in the interface that that enum implements. Otherwise I cannot come up with a generic solution.
Any ideas?