| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 | 
							- package com.miniframe.generate.appcode;
 
- /**
 
-  * 定时器运行模式
 
-  */
 
- public enum TimmerRunMode {
 
- 	SINGLETON("SINGLETON", "0", "单例"),
 
- 	MULTITON("MULTITON", "1", "多例");
 
- 	// 成员变量
 
- 	private String index; // value
 
- 	private String name; // key
 
- 	private String desc; // 描述
 
- 	
 
- 	/**
 
- 	 * 构造方法
 
- 	 * @param name
 
- 	 * @param index
 
- 	 * @param desc
 
- 	 */
 
- 	private TimmerRunMode(String name, String index, String desc) {
 
- 		this.name = name;
 
- 		this.index = index;
 
- 		this.desc = desc;
 
- 	}
 
- 	/**
 
- 	 * 通过index获取对象
 
- 	 * 
 
- 	 * @param index
 
- 	 * @return
 
- 	 */
 
- 	public static TimmerRunMode getTimmerRunMode(String index) {
 
- 		for (TimmerRunMode c : TimmerRunMode.values()) {
 
- 			if (c.getIndex().equals(index)) {
 
- 				return c;
 
- 			}
 
- 		}
 
- 		return null;
 
- 	}
 
- 	public String getName() {
 
- 		return name;
 
- 	}
 
- 	public void setName(String name) {
 
- 		this.name = name;
 
- 	}
 
- 	public String getIndex() {
 
- 		return index;
 
- 	}
 
- 	public void setIndex(String index) {
 
- 		this.index = index;
 
- 	}
 
- 	public String getDesc() {
 
- 		return desc;
 
- 	}
 
- 	public void setDesc(String desc) {
 
- 		this.desc = desc;
 
- 	}
 
- }
 
 
  |