Enum Class NativeType
- すべての実装されたインタフェース:
Serializable
,Comparable<NativeType>
,Constable
Native Type(int型やlong型等)を管理するEnum型です。
- 機能分類
- 画面表示
- 導入されたバージョン:
- JDK5.0,
-
ネストされたクラスの概要
クラスから継承されたネストされたクラス/インタフェース java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
列挙型定数の概要
列挙定数 -
メソッドの概要
修飾子とタイプメソッド説明static NativeType
指定の文字列が、どの、NativeType なのか、判定します。static NativeType
Returns the enum constant of this class with the specified name.static NativeType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
列挙型定数の詳細
-
INT
NATIVEの型 [int] の識別コード (INT) -
LONG
NATIVEの型 [long] の識別コード (LONG) -
DOUBLE
NATIVEの型 [double] の識別コード (DOUBLE) -
STRING
NATIVEの型 [String] の識別コード (STRING) -
CALENDAR
NATIVEの型 [Calendar] の識別コード (CALENDAR)
-
-
メソッドの詳細
-
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
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 nameNullPointerException
- 引数がnullの場合
-
getType
指定の文字列が、どの、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を返しません
-