Say i have enum like this:
object Enm extends Enumeration {
val ONE, TWO, THREE = Value
}
and it's possible for me to get disired result by calling with name on it Enm.withName("ONE")
, but if i have Value with argument, say:
object Enm extends Enumeration {
val ONE = Value("1")
val TWO = Value("2")
val THREE = Value("3")
}
calling Enm.withName("ONE")
i get back noting since it's now "1", "2" and so on.
Is it possible somehow to get val names but not the ones i put in Value?