Blame |
Last modification |
View Log
| Download
| RSS feed
package br.com.ec.domain.model.tipos;
public enum TipoOcorrenciaEscala
{
PONTO_COMPLETO
("C",
"PONTO COMPLETO",
"green"),
PONTO_INCOMPLETO
("I",
"PONTO INCOMPLETO",
"orange"),
SEM_PONTO
("S",
"SEM PONTO",
"white");
private String tipo
;
private String descricao
;
private String cor
;
private TipoOcorrenciaEscala
(String tipo,
String descricao,
String cor
) {
this.
tipo = tipo
;
this.
descricao = descricao
;
this.
cor = cor
;
}
public String getDescricao
() {
return descricao
;
}
public String getCor
() {
return cor
;
}
public String getValor
() {
return tipo
;
}
public static TipoOcorrenciaEscala parse
(String tipo
) {
for (TipoOcorrenciaEscala item : TipoOcorrenciaEscala.
values()) {
if (item.
getValor().
equals(tipo
)) {
return item
;
}
}
return null;
}
}