⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 noticetypeutil.java.svn-base

📁 学习dwr+struts2+spring进行开发的好例子
💻 SVN-BASE
字号:
package com.szhelper.lotteryWeb.util;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.szhelper.lotteryWeb.Constants;

public class NoticeTypeUtil {
	private static List noticeTypeList = new ArrayList();
	private static Map<Integer, String> noticeTypeMap = new HashMap<Integer, String>();

	static {
		List<String> keys = WebConfig
				.getList(Constants.NOTICETYPES_NOTICETYPE_KEY);
		List<String> values = WebConfig
				.getList(Constants.NOTICETYPES_NOTICETYPE_VALUE);

		try {
			for (int i = 0; i < keys.size(); i++) {
				noticeTypeList.add(new NoticeType(keys.get(i), values.get(i)));
				noticeTypeMap.put(Integer.valueOf(keys.get(i)), values.get(i));
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	// === inner class
	public static class NoticeType {
		String value;
		String key;

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

		public String getKey() {
			return key;
		}

		public String getValue() {
			return value;
		}
	}

	public static List getNoticeTypeList() {
		return noticeTypeList;
	}

	public static Map<Integer, String> getNoticeTypeMap() {
		return noticeTypeMap;
	}

	public static String getNoticeTypeDesc(Integer key) {
		return getNoticeTypeMap().get(key);
	}

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -