Writing /volume1/Web/Public/dokuwiki/data/log/deprecated/2024-11-15.log failed

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

次のリビジョン
前のリビジョン
study:java:enumerated_type [2008/05/08 15:52] – created bananastudy:java:enumerated_type [2008/05/08 15:59] (現在) banana
行 129: 行 129:
   {   {
     return getValue();     return getValue();
 +  }
 +}
 +</code>
 +
 +
 +====== An example of class extends an EnumeratedType class ======
 +<code java>
 +public class ProjectType extends EnumeratedType
 +{
 +  public final static ProjectType UNKNOWN = new ProjectType( -1, "Unknown");
 +  public final static ProjectType EXTERNAL_WEB = new ProjectType(0,"External Web Application");
 +  public final static ProjectType INTERNAL_WEB = new ProjectType(5,"Internal Web Application");
 +  public final static ProjectType EXTERNAL_DB = new ProjectType(10,"External Database");
 +  public final static ProjectType INTERANL_DB = new ProjectType(15,"Internal Database");
 +  public final static ProjectType EXTERNAL_DESKTOP = new ProjectType(20,"External Desktop Application");
 +  public final static ProjectType INTERNAL_DESKTOP = new ProjectType(25,"Internal Desktop Application");
 +
 +  private static EnumManager enumManager;
 +
 +  static
 +  {
 +    enumManager = new EnumManager();
 +    enumManager.addInstance(UNKNOWN);
 +    enumManager.addInstance(EXTERNAL_WEB);
 +    enumManager.addInstance(INTERNAL_WEB);
 +    enumManager.addInstance(EXTERNAL_DB);
 +    enumManager.addInstance(INTERANL_DB);
 +    enumManager.addInstance(EXTERNAL_DESKTOP);
 +    enumManager.addInstance(INTERNAL_DESKTOP);
 +  }
 +
 +  public static EnumManager getEnumManager()
 +  {
 +    return enumManager;
 +  }
 +
 +  private ProjectType(int value, String description)
 +  {
 +    super(value, description);
   }   }
 } }
 </code> </code>

QR Code
QR Code study:java:enumerated_type (generated for current page)