All Downloads are FREE. Search and download functionalities are using the official Maven repository.

Groovy.modelEnum.mustache Maven / Gradle / Ivy

There is a newer version: 7.9.0
Show newest version
enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} {
{{#allowableValues}}{{#enumVars}}
    {{#enumDescription}}
        /**
        * {{.}}
        */
    {{/enumDescription}}
    {{{name}}}({{{value}}}){{^-last}},
    {{/-last}}{{/enumVars}}{{/allowableValues}}

    private final {{{dataType}}} value

    {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}({{{dataType}}} value) {
        this.value = value
    }

    {{{dataType}}} getValue() {
        value
    }

    @Override
    String toString() {
        String.valueOf(value)
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy