Subversion Repositories Integrator Subversion

Rev

Blame | Last modification | View Log | Download | RSS feed

package br.com.ec.domain.shared;

public enum TipoCor {
       
        PRETO("black", "#000000"),
        AZUL("blue", "#0000ff"),
        AZUL_PADRAO("blue-madison", "#578ebe"),
        LARANJA_PADRAO("orange", "#ffa500"),
        VERMELHO_PADRAO("red-pink", "#de6162"),
        VERMELHO_INTENSE("red-intense", "#e35b5a"),
        VERMELHO("red", "#d84a38"),
        VERDE_PADRAO("green-haze", "#44b6ae")
        ;
       
        private String tipo;
        private String descricao;

        private TipoCor(String tipo, String descricao) {
                this.tipo = tipo;
                this.descricao = descricao;
        }
       
        public String getDescricao() {
                return descricao;
        }
       
        public String getValor() {
                return tipo;
        }
       
        public static TipoCor parse(String tipo) {
                for (TipoCor item : TipoCor.values()) {
                        if (item.getValor().equals(tipo)) {
                                return item;
                        }
                }
                return null;
        }

}