If there are not so many options and if they do not programatically change, I would suggest creating a dedicated subclass for all of them: â BormParticipantOrganizationType â BormParticipantSystemType â BormParticipantPersonType All subclasses of BormParticipantType. And then use something like: 1) BormParticipantOrganizationType new 2) BormParticipantOrganizationType instance 3) â¦or your preferred way of making singletons The advantages? â It shows well in the autocompletion. â The values can have different behavior. â And probably some more. The disadvantages? â Serialization into a simple String (and subsequent deserialization) does not come for free, though it is easy to create methods for that. â Longer class names. â With a lot of different enums, the class count will grow significantly. Michal On 23.3.2016 20:31, Peter Uhnák wrote:
BormParticipantRole class selectors "#(#Approves #Undefined #Performs #Initiates #IsResponsible #Acquires #Cooperates #IsInformed #Consults)" BormParticipantType class selectors "#(#Organization #System #Person)"
But maybe Color was wrong example because the set can be very large (although the set of options is also limited if you consider some standards).