Marker trait for ADTs representing enumerations
Typeclass with conversions to and from strings for ADTs representing enumerations
Marker trait for ADTs representing enumerations with an associated value ("index")
Marker trait for ADTs representing enumerations with an associated value ("index")
The convention requires the following structure for the enumeration:
sealed trait EnumName extends CaseEnum { type Index = IndexType }
object EnumName {
case object Element1 extends EnumName { val index = element1Index }
case object Element2 extends EnumName { val index = element2Index }
}
Marker trait for ADTs representing enumerations
The convention requires the following structure for the enumeration:
sealed trait EnumName extends CaseEnum object EnumName { case object Element1 extends EnumName case object Element2 extends EnumName }