isprepay.java
来自「采用JAVA开发」· Java 代码 · 共 46 行
JAVA
46 行
package com.gctech.sms.core;
import java.util.Map;
import java.util.TreeMap;
import java.util.Collection;
/**
* 是否为预付费。
* $Id: IsPrepay.java,v 1.1 2004/05/24 06:19:47 wanghb Exp $
* */
public class IsPrepay {
public IsPrepay(int value, String name) {
this.value = value;
this.name = name;
}
private String name;
private int value;
public static final IsPrepay IS_PREPAY = new IsPrepay(0, "后付费");
public static final IsPrepay IS_NOT_PREPAY = new IsPrepay(1, "预付费");
static Map all = new TreeMap();
static {
all.put(new Integer(0), IS_PREPAY);
all.put(new Integer(1), IS_NOT_PREPAY);
}
public static Collection getAll(){
return all.values();
}
public static String valueToName(int value){
IsPrepay cmdSts = (IsPrepay)all.get(new Integer(value));
return cmdSts.getName();
}
public String getName() {
return name;
}
public int getValue() {
return value;
}
public void setName(String name) {
this.name = name;
}
public void setValue(int value) {
this.value = value;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?