Enum Class NativeType

java.lang.Object
java.lang.Enum<NativeType>
org.opengion.fukurou.model.NativeType
すべての実装されたインタフェース:
Serializable, Comparable<NativeType>, Constable

public enum NativeType extends Enum<NativeType>
Native Type(int型やlong型等)を管理するEnum型です。
機能分類
画面表示
導入されたバージョン:
JDK5.0,
  • 列挙型定数の詳細

    • INT

      public static final NativeType INT
      NATIVEの型 [int] の識別コード (INT)
    • LONG

      public static final NativeType LONG
      NATIVEの型 [long] の識別コード (LONG)
    • DOUBLE

      public static final NativeType DOUBLE
      NATIVEの型 [double] の識別コード (DOUBLE)
    • STRING

      public static final NativeType STRING
      NATIVEの型 [String] の識別コード (STRING)
    • CALENDAR

      public static final NativeType CALENDAR
      NATIVEの型 [Calendar] の識別コード (CALENDAR)
  • メソッドの詳細

    • values

      public static NativeType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      戻り値:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static NativeType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      パラメータ:
      name - 返される列挙型定数の名前。
      戻り値:
      指定した名前の列挙型定数
      例外:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - 引数がnullの場合
    • getType

      public static NativeType getType(String str)
      指定の文字列が、どの、NativeType なのか、判定します。 判定ロジックは、以下の様にしています。
         INT      = Pattern.compile("-?[0-9]{1,9}");
         LONG     = Pattern.compile("-?[0-9]+");
         DOUBLE   = Pattern.compile("-?[0-9]+\\.?[0-9]+");
         CALENDAR = Pattern.compile("[0-9]{4}/[01]{1}[0-9]{1}/[0-3]{1}[0-9]{1}");
       
      パラメータ:
      str - 判定する文字列
      戻り値:
      判定結果
      変更履歴:
      5.1.8.0 (2010/07/01) 新規追加, 6.3.9.1 (2015/11/27) メソッドの出口は、最後の1か所にすべきです(PMD)。
      このメソッドは、nullを返しません