macrame.enums
This trait provides conversion from Long to an enumeration. It works by extending the companion object of the enumeration class.
@enum class Color { Red Blue Yellow } object Color extends FromLong[Color]
This creates the following function to convert Long to Option[Color].
Long
Option[Color].
Color.fromLong(0l) // returns Some(Red)
This trait provides conversion from Long to an enumeration. It works by extending the companion object of the enumeration class.
This creates the following function to convert
Long
toOption[Color].