All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.jiangzeyin.database.event.BaseEnum Maven / Gradle / Ivy

There is a newer version: 1.2.11
Show newest version
package cn.jiangzeyin.database.event;

import com.alibaba.fastjson.JSONObject;

/**
 * Created by jiangzeyin on 2017/2/27.
 */
public interface BaseEnum {

    int getCode();


    String getDesc();


    static JSONObject toJSONObject(BaseEnum[] baseEnums) {
        JSONObject jsonObject = new JSONObject();
        for (BaseEnum item : baseEnums) {
            jsonObject.put(String.valueOf(item.getCode()), item.getDesc());
        }
        return jsonObject;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy