Enum, start at 1?

In Java you can say: enum class X { FOO = 1, ... Am I right that there is no equivalent in Kotlin?

thanks,
Rob

> In Java you can say: enum class X { FOO = 1, ...

What version of Java do you have in mind?

> Am I right that there is no equivalent in Kotlin?

Not at the moment. What is your use case?

abreslav wrote: > In Java you can say: enum class X { FOO = 1, ...

What version of Java do you have in mind?

A Java from a parallel universe. Sorry, got my languages confused.

abreslav wrote:

> Am I right that there is no equivalent in Kotlin?

Not at the moment. What is your use case?

Getting the Enum.ordinal() integers to line up with values in a database. But I’ll just define an instance variable like ‘dbValue’ in the enum. Maybe that takes some extra space, but it shouldn’t matter in my case.

Rob