Rev 106 | Details | Compare with Previous | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 106 | espaco | 1 | package br.com.ec.domain.model.tipos; |
| 2 | |||
| 3 | public enum TipoAno { |
||
| 4 | |||
| 5 | ANO_2014("2014", "2014"), |
||
| 6 | ANO_2015("2015", "2015"), |
||
| 7 | ANO_2016("2016", "2016"), |
||
| 8 | ANO_2017("2017", "2017"), |
||
| 9 | ANO_2018("2018", "2018"), |
||
| 10 | ANO_2019("2019", "2019"), |
||
| 11 | ANO_2020("2020", "2020"), |
||
| 12 | ANO_2021("2021", "2021"), |
||
| 13 | ANO_2022("2022", "2022"), |
||
| 14 | ANO_2023("2023", "2023"), |
||
| 15 | ANO_2024("2024", "2024"), |
||
| 747 | blopes | 16 | ANO_2025("2025", "2025"), |
| 17 | ANO_2026("2026", "2026"); |
||
| 106 | espaco | 18 | |
| 19 | private String tipo; |
||
| 20 | private String descricao; |
||
| 21 | |||
| 22 | private TipoAno(String tipo, String descricao) { |
||
| 23 | this.tipo = tipo; |
||
| 24 | this.descricao = descricao; |
||
| 25 | } |
||
| 26 | |||
| 27 | public String getDescricao() { |
||
| 28 | return descricao; |
||
| 29 | } |
||
| 30 | |||
| 31 | public String getValor() { |
||
| 32 | return tipo; |
||
| 33 | } |
||
| 34 | |||
| 35 | public static TipoAno parse(String tipo) { |
||
| 36 | for (TipoAno item : TipoAno.values()) { |
||
| 37 | if (item.getValor().equals(tipo)) { |
||
| 38 | return item; |
||
| 39 | } |
||
| 40 | } |
||
| 41 | return null; |
||
| 42 | } |
||
| 43 | |||
| 44 | } |