Blame |
Last modification |
View Log
| Download
| RSS feed
package br.com.sl.domain.model.tipos;
public enum TipoSinal
{
COMPRA_C
("C",
"COMPRAR"),
VENDA_V
("B",
"VENDER");
private String tipo
;
private String descricao
;
private TipoSinal
(String tipo,
String descricao
) {
this.
tipo = tipo
;
this.
descricao = descricao
;
}
public String getDescricao
() {
return descricao
;
}
public String getValor
() {
return tipo
;
}
public static TipoSinal parse
(String tipo
) {
for (TipoSinal item : TipoSinal.
values()) {
if (item.
getValor().
equals(tipo
)) {
return item
;
}
}
return null;
}
}