On 2015-04-20 20:05, Steven Schveighoffer wrote:
enum LineStyle : string { NONE = "None", SOLID = "Solid", ... // etc }Used like this: funcThatTakesString(LineStyle.NONE); LineStyle ls = LineStyle.SOLID; funcThatTakesLineStyle(ls); I'm not a Java programmer, and my time with Java was before enums. But this is how I would do it.
This is probably the best translation, depending on if the Java API needs to be retained or not. "label" is not included in this translation, assuming you can access that in Java.
-- /Jacob Carlborg
