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

📄 commandstatus.java

📁 采用JAVA开发
💻 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: CommandStatus.java,v 1.1.1.1 2004/04/21 09:30:41 wanghb Exp $
 */

public class CommandStatus {
  public static final CommandStatus STATUS_FORBID = new CommandStatus(0, "禁止");
  public static final CommandStatus STATUS_ONLINE = new CommandStatus(1, "上线");
  public static final CommandStatus STATUS_TEST = new CommandStatus(2, "测试中");

  private String name;
  private int value;
  static Map all = new TreeMap();
  static {
    all.put(new Integer(0), STATUS_FORBID);
    all.put(new Integer(1), STATUS_ONLINE);
    all.put(new Integer(2), STATUS_TEST);
  }
  public static Collection getAll(){
    return all.values();
  }
  public CommandStatus(int value, String name) {
    this.value = value;
    this.name = name;
  }
  public static String valueToName(int value){
    CommandStatus cmdSts = (CommandStatus)all.get(new Integer(value));
    return cmdSts.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 + -