Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Some examples (inspired by the Java Enum Tutorial):

Or with a bit of refactoring, you could write the switch like this:

Here is a coin example:

Here is a planet example:

Note: there are currently issues with using Groovy enums in conjunction with GroovyShell. Best bet would be to check Jira if you are having problems, e.g.

  • No labels