📄 msgformat.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 wengjl
* @version $Id: MsgFormat.java,v 1.1.1.1 2004/04/21 09:30:41 wanghb Exp $
*/
public class MsgFormat {
public static final MsgFormat MSG_ASCII = new MsgFormat(0, "ASCII编码");
public static final MsgFormat MSG_SAVE = new MsgFormat(3, "保留");
public static final MsgFormat MSG_ER_MESSAE = new MsgFormat(4, "二进制短消息");
public static final MsgFormat MSG_UCS2 = new MsgFormat(8, "UCS2编码");
public static final MsgFormat MSG_GB2312 = new MsgFormat(15, "GB2312编码");
private String name;
private int value;
static Map all = new TreeMap();
static {
all.put(new Integer(0), MSG_ASCII);
all.put(new Integer(3), MSG_SAVE);
all.put(new Integer(4), MSG_ER_MESSAE);
all.put(new Integer(8), MSG_UCS2);
all.put(new Integer(15), MSG_GB2312);
}
public static Collection getAll(){
return all.values();
}
public MsgFormat(int value, String name) {
this.value = value;
this.name = name;
}
public static String valueToName(int value){
MsgFormat type = (MsgFormat)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 + -