package net.northking.cctp.element.core.type;

import com.alibaba.fastjson.JSON;

import java.util.*;

public enum NullEnum implements EnumClass{
    ;

    private String key;

    private String value;

    NullEnum(String key, String value){
        this.key = key;
        this.value = value;
    }

    @Override
    public String getEnumData() {
        List<Map<String,Object>> result = new ArrayList<>();
        for (NullEnum nullEnum : EnumSet.allOf(NullEnum.class)) {
            Map<String,Object> one = new HashMap();
            one.put("label",nullEnum.key);
            one.put("value",nullEnum.value);
            result.add(one);
        }
        return JSON.toJSONString(result);
    }
}
