Package cdc.impex.templates
Enum Primitive
- java.lang.Object
-
- java.lang.Enum<Primitive>
-
- cdc.impex.templates.Primitive
-
- All Implemented Interfaces:
Serializable,Comparable<Primitive>
public enum Primitive extends Enum<Primitive>
Enumeration of primitive types.Typically used for JSON serialization.
- Author:
- Damien Carbonne
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static PrimitivegetPrimitive(Class<?> cls)Returns the Primitive corresponding to a class.static PrimitivevalueOf(String name)Returns the enum constant of this type with the specified name.static Primitive[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
BOOL
public static final Primitive BOOL
-
INT
public static final Primitive INT
-
REAL
public static final Primitive REAL
-
BIG_INT
public static final Primitive BIG_INT
-
BIG_DEC
public static final Primitive BIG_DEC
-
CHAR
public static final Primitive CHAR
-
STRING
public static final Primitive STRING
-
ENUM
public static final Primitive ENUM
-
-
Method Detail
-
values
public static Primitive[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Primitive c : Primitive.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Primitive valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
-