枚举 ResponseCode

  • 所有已实现的接口:
    java.io.Serializable, java.lang.Comparable<ResponseCode>

    public enum ResponseCode
    extends java.lang.Enum<ResponseCode>
    ResponseCode.
    版本:
    $Id: ResponseCode.java, v 0.1 2020年07月14日 2:04 PM liuzunfei Exp $
    作者:
    liuzunfei
    • 枚举常量概要

      枚举常量 
      枚举常量 说明
      FAIL
      Request failed.
      SUCCESS
      Request success.
    • 字段概要

      字段 
      修饰符和类型 字段 说明
      (专用程序包) int code  
      (专用程序包) java.lang.String desc  
    • 构造器概要

      构造器 
      限定符 构造器 说明
      private ResponseCode​(int code, java.lang.String desc)  
    • 方法概要

      所有方法 静态方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      int getCode()
      Getter method for property code.
      java.lang.String getDesc()
      Getter method for property desc.
      void setCode​(int code)
      Setter method for property code.
      void setDesc​(java.lang.String desc)
      Setter method for property desc.
      static ResponseCode valueOf​(java.lang.String name)
      返回带有指定名称的该类型的枚举常量。
      static ResponseCode[] values()
      按照声明该枚举类型的常量的顺序, 返回 包含这些常量的数组。
      • 从类继承的方法 java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • 从类继承的方法 java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • 枚举常量详细资料

      • SUCCESS

        public static final ResponseCode SUCCESS
        Request success.
      • FAIL

        public static final ResponseCode FAIL
        Request failed.
    • 字段详细资料

      • code

        int code
      • desc

        java.lang.String desc
    • 构造器详细资料

      • ResponseCode

        private ResponseCode​(int code,
                             java.lang.String desc)
    • 方法详细资料

      • values

        public static ResponseCode[] values()
        按照声明该枚举类型的常量的顺序, 返回 包含这些常量的数组。该方法可用于迭代 常量, 如下所示:
        for (ResponseCode c : ResponseCode.values())
            System.out.println(c);
        
        返回:
        按照声明该枚举类型的常量的顺序返回的包含这些常量的数组
      • valueOf

        public static ResponseCode valueOf​(java.lang.String name)
        返回带有指定名称的该类型的枚举常量。 字符串必须与用于声明该类型的枚举常量的 标识符完全匹配。(不允许有多余 的空格字符。)
        参数:
        name - 要返回的枚举常量的名称。
        返回:
        返回带有指定名称的枚举常量
        抛出:
        java.lang.IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量
        java.lang.NullPointerException - 如果参数为空值
      • getCode

        public int getCode()
        Getter method for property code.
        返回:
        property value of code
      • setCode

        public void setCode​(int code)
        Setter method for property code.
        参数:
        code - value to be assigned to property code
      • getDesc

        public java.lang.String getDesc()
        Getter method for property desc.
        返回:
        property value of desc
      • setDesc

        public void setDesc​(java.lang.String desc)
        Setter method for property desc.
        参数:
        desc - value to be assigned to property desc