Rev 182 |
Blame |
Compare with Previous |
Last modification |
View Log
| Download
| RSS feed
package br.com.ec.domain.model.tipos;
public enum TipoRacaCor
{
INDIGENA
("I",
"INDÍGENA"),
BRANCA
("B",
"BRANCA"),
NEGRA
("N",
"NEGRA"),
AMARELA
("A",
"AMARELA"),
PARDA
("P",
"PARDA"),
NAO_INFORMADA
("Z",
"NÃO INFORMADA");
private String tipo
;
private String descricao
;
private TipoRacaCor
(String tipo,
String descricao
) {
this.
tipo = tipo
;
this.
descricao = descricao
;
}
public String getDescricao
() {
return descricao
;
}
public String getValor
() {
return tipo
;
}
public static TipoRacaCor parse
(String tipo
) {
for (TipoRacaCor item : TipoRacaCor.
values()) {
if (item.
getValor().
equals(tipo
)) {
return item
;
}
}
return null;
}
}