📄 subtype.java
字号:
package com.gctech.sms.core;
import java.util.TreeMap;
import java.util.Map;
import java.util.Collection;
/**
* <p>Title: </p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2004</p>
* <p>Company: gctech</p>
* @author 王红宝
* @version $Id: SubType.java,v 1.1.1.1 2004/04/21 09:30:41 wanghb Exp $
* 短消息子类型(0=取消订阅,1=订阅或点播请求,2=点播下发,3=订阅下发,其他保留)
*/
public class SubType {
public static final SubType SUB_CANCEL_SUBMIT = new SubType(0, "取消订阅");
public static final SubType SUB_SUBMIT_ORDER_REQ = new SubType(1, "订阅或点播请求");
public static final SubType SUB_ORDER_MT = new SubType(2, "点播下发");
public static final SubType SUB_SUBMIT_MT = new SubType(3, "订阅下发");
private String name;
private int value;
static Map all = new TreeMap();
static {
all.put(new Integer(0), SUB_CANCEL_SUBMIT);
all.put(new Integer(1), SUB_SUBMIT_ORDER_REQ);
all.put(new Integer(2), SUB_ORDER_MT);
all.put(new Integer(3), SUB_SUBMIT_MT);
}
public static Collection getAll(){
return all.values();
}
public SubType(int value, String name) {
this.value = value;
this.name = name;
}
public static String valueToName(int value){
SubType type = (SubType)all.get(new Integer(value));
return type.getName();
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getValue() {
return value;
}
public void setValue(int value) {
this.value = value;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -