The sequence of values for your Enum.
The sequence of values for your Enum. You will typically want
to implement this in your extending class as a val
so that withName
and friends are as efficient as possible.
Feel free to implement this however you'd like (including ordering, etc) if that fits your needs better.
Method that returns the Set of A objects that the macro was able to find.
Method that returns the Set of A objects that the macro was able to find.
You will want to use this in some way to implement your values method. In fact, if you aren't using this method...why are you even bothering with this lib?
Map of A object names to As
Tries to get an A by the supplied name.
Tries to get an A by the supplied name. The name corresponds to the .toString of the case objects implementing A
All the cool kids have their own Enumeration implementation, most of which try to do so in the name of implementing exhaustive pattern matching.
This is yet another one.
Oh yeah, Enum is BYOO (bring your own ordinality). Take care of that when you implement the value method.
How to use:
The sealed trait you want to use as the main