Blame |
Last modification |
View Log
| Download
| RSS feed
package br.gov.al.saude.srv.model.enums;
import br.gov.al.saude.framework.core.generic.TipoEnum;
public enum TipoNivel
implements TipoEnum
{
ELEMENTAR
("E",
"Elementar"),
MEDIO
("M",
"Médio"),
SUPERIOR
("S",
"Superior");
private final String value
;
private String descricao
;
private TipoNivel
(String value,
String descricao
) {
this.
value = value
;
this.
descricao = descricao
;
}
public String getValue
() {
return this.
value;
}
public String getDescricao
() {
return this.
descricao;
}
public static TipoNivel parse
(String tipo
) {
for (TipoNivel item : TipoNivel.
values()) {
if (item.
getValue().
equals(tipo
)) {
return item
;
}
}
return null;
}
@
Override
public String toString
() {
return this.
getDescricao();
}
}