Skip to content

Instantly share code, notes, and snippets.

View techmag's full-sized avatar
🎯
Focusing

Gary Hewett techmag

🎯
Focusing
View GitHub Profile
README.txt - DIY Scala Enumeration
Copyright (C) 2014 Jim O'Flaherty
Overview:
Provide in Scala the closest equivalent to Java Enum
- includes decorating each declared Enum member with extended information
- guarantees pattern matching exhaustiveness checking
- this is not available with scala.Enumeration
StackOverflow answer covering entire Scala enumeration options domain: