상량 공구류

1511 단어
/**
 * @author Administrator
 * @create 2018/8/1
 */
public class Const {
    /**
     *  
     */
    public static final String EMAIL = "email";
    /**
     *  
     */
    public interface ProductListOrderBy{
        Set PRICE_ASC_DESC = Sets.newHashSet("price_desc","price_asc");
    }
    /**
     *  
     */
    public interface Cart{
        int CHECKED = 1;
        int UN_CHECKED = 0;

        String LIMIT_NUM_FAIL = "LIMIT_NUM_FAIL";
        String LIMIT_NUM_SUCCESS = "LIMIT_NUM_SUCCESS";
    }
    /**
     *  
     */
    public enum OrderStatusEnum{
        /**
         * 
         */
        CANCELED(0," ");
        /**
         *  
         * @param code
         * @param value
         */
        OrderStatusEnum(int code,String value){
            this.code = code;
            this.value = value;
        }
        private String value;
        private int code;
        public String getValue() {
            return value;
        }
        public int getCode() {
            return code;
        }
        /**
         *  
         * @param code
         * @return
         */
        public static OrderStatusEnum codeOf(int code){
            for(OrderStatusEnum orderStatusEnum : values()){
                if(orderStatusEnum.getCode() == code){
                    return orderStatusEnum;
                }
            }
            throw new RuntimeException(" ");
        }
    }
}

좋은 웹페이지 즐겨찾기