标签:void string str turn div code nal pack 枚举
package com.mq; import java.util.Arrays; import java.util.HashMap; import java.util.Map; public enum ChannelEnum { WEBB("15","威客巴巴"), CMM("19","菜嬷嬷"); private String channelCode; private String channelName; ChannelEnum(String channelCode, String channelName) { this.channelCode = channelCode; this.channelName = channelName; } public static final Map<String, String> channelEnumMap = new HashMap<>(); static { Arrays.stream(ChannelEnum.values()).forEach(e->channelEnumMap.put(e.getChannelCode(),e.getChannelName())); } public String getChannelCode() { return channelCode; } public String getChannelName() { return channelName; } public void setChannelCode(String channelCode) { this.channelCode = channelCode; } public void setChannelName(String channelName) { this.channelName = channelName; } }
标签:void string str turn div code nal pack 枚举
原文地址:https://www.cnblogs.com/zrui-xyu/p/10863796.html