Enum Class Primitive

java.lang.Object
java.lang.Enum<Primitive>
cdc.impex.templates.Primitive
All Implemented Interfaces:
Serializable, Comparable<Primitive>, Constable

public enum Primitive extends Enum<Primitive>
Enumeration of primitive types.

Typically used for JSON serialization.

Author:
Damien Carbonne
  • Enum Constant Details

  • Method Details

    • values

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

      public static Primitive 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.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getPrimitive

      public static Primitive getPrimitive(Class<?> cls)
      Returns the Primitive corresponding to a class.
      Parameters:
      cls - The class.
      Returns:
      The Primitive corresponding to cls or null.