I am looking for a mechanism to implement rich enumerations in Scala, the same way you can in Java add abstract methods to enums and implement them in the instances of of the enum.
Please note that using a sealed trait and case objects is not a solution, because I would not be able to iterate over the existing case objects, unless I mantain a list of them, which is very fragile to changes (especially by other people who don't understand what's going on there)
Check also what Viktor Klang suggested here: https://gist.github.com/viktorklang/1057513
It's a very safe way to construct an enum.
Just extend
Val
.or