Groovy web console

subscribe to the feed Subscribe
to this
site

Enumeration and toString

Published 3 months ago by Ulisses with tags enum toString
Actions Execute script  ▶ Edit in console Back to console Show/hide line numbers View recent scripts
public enum StatusXPTO {
    AGUARDANDO_ANALISE,
    FINALIZADA,
    CANCELADA,
}


def a = [:]
a.status = StatusXPTO.FINALIZADA

a.status.toString() == 'FINALIZADA'