I have an enumeration like this:
object Ops extends Enumeration { val one = Value(0x01) val two = Value(0x02) val three = Value(0x03) val four = Value(0x04) }
I want to say
Byte someByte = functionThatReturnsAByte val op = Ops.valueOf(someByte)
The only close method is withName, which only accepts a string.
source share