By mixing this into your enum you are able to pattern match on string values that you want to convert to enum values (iif they are valid).
This is a fully type safe enumeration framework.
here for backward compatability for code that import com.
shortcut to create an EnumReader
shortcut to create an EnumReader
the enum type to convert
the method to convert a string to your enum
an EnumReader that knows how to read a string into your enum
creates an EnumReader that converts a string into an enum if the lowercase version of that string matches the lowercase of the enum
creates an EnumReader that converts a string into an enum if the lowercase version of that string matches the lowercase of the enum
the enumeration type
the enumeration values that are candidates to convert
an EnumReader that has the aforementioned properties
creates an EnumReader that converts a string into an enum if the uppercase version of that string matches the uppercase of the enum
creates an EnumReader that converts a string into an enum if the uppercase version of that string matches the uppercase of the enum
the enumeration type
the enumeration values that are candidates to convert
an EnumReader that has the aforementioned properties