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