Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 744 | blopes | 1 | package br.com.ec.domain.model.tipos; |
| 2 | |||
| 3 | public enum TipoMes { |
||
| 4 | |||
| 5 | MES_JANEIRO("01", "JANEIRO"), |
||
| 6 | MES_FEVEREIRO("02", "FEVEREIRO"), |
||
| 7 | MES_MARÇO("03", "MARÇO"), |
||
| 8 | MES_ABRIL("04", "ABRIL"), |
||
| 9 | MES_MAIO("05", "MAIO"), |
||
| 10 | MES_JUNHO("06", "JUNHO"), |
||
| 11 | MES_JULHO("07", "JULHO"), |
||
| 12 | MES_AGOSTO("08", "AGOSTO"), |
||
| 13 | MES_SETEMBRO("09", "SETEMBRO"), |
||
| 14 | MES_OUTUBRO("10", "OUTUBRO"), |
||
| 15 | MES_NOVEMBRO("11", "NOVEMBRO"), |
||
| 16 | MES_DEZEMBRO("12", "DEZEMBRO"); |
||
| 17 | |||
| 18 | private String tipo; |
||
| 19 | private String descricao; |
||
| 20 | |||
| 21 | private TipoMes(String tipo, String descricao) { |
||
| 22 | this.tipo = tipo; |
||
| 23 | this.descricao = descricao; |
||
| 24 | } |
||
| 25 | |||
| 26 | public String getDescricao() { |
||
| 27 | return descricao; |
||
| 28 | } |
||
| 29 | |||
| 30 | public String getValor() { |
||
| 31 | return tipo; |
||
| 32 | } |
||
| 33 | |||
| 34 | public static TipoMes parse(String tipo) { |
||
| 35 | for (TipoMes item : TipoMes.values()) { |
||
| 36 | if (item.getValor().equals(tipo)) { |
||
| 37 | return item; |
||
| 38 | } |
||
| 39 | } |
||
| 40 | return null; |
||
| 41 | } |
||
| 42 | |||
| 43 | } |