if I define an enum class, let's say:
enum class MyEnum { }
I can do the following as enum class all have a values
method:
val values = MyEnum.values()
Now I want my enum to implement an interface and have access to the values() method:
enum class MyEnum : EnumInterface { }
interface EnumInterface {
fun values() : Array<T>
fun doStuff() {
this.values()
}
}
This doesn't compile and I'm sure how to type the values method. Is it possible to define such interface? Thanks!