Enum Class SerdeConfiguration.NumericTimeUnit

java.lang.Object
java.lang.Enum<SerdeConfiguration.NumericTimeUnit>
io.micronaut.serde.config.SerdeConfiguration.NumericTimeUnit
All Implemented Interfaces:
Serializable, Comparable<SerdeConfiguration.NumericTimeUnit>, Constable
Enclosing interface:
SerdeConfiguration

public static enum SerdeConfiguration.NumericTimeUnit extends Enum<SerdeConfiguration.NumericTimeUnit>
Time unit to use when deserializing a numeric value, or when serializing to a numeric value as configured by SerdeConfiguration.getTimeWriteShape().
Since:
2.0.0
  • Enum Constant Details

    • LEGACY

      public static final SerdeConfiguration.NumericTimeUnit LEGACY
      Legacy unit for compatibility with documents created by micronaut-serialization 1.x (micronaut-core 3.x).
    • SECONDS

      public static final SerdeConfiguration.NumericTimeUnit SECONDS
      Serialize as seconds, the default. Nanoseconds may still be represented as the fractional part.
    • MILLISECONDS

      public static final SerdeConfiguration.NumericTimeUnit MILLISECONDS
      Serialize as milliseconds. Nanoseconds may still be represented as the fractional part.
    • NANOSECONDS

      public static final SerdeConfiguration.NumericTimeUnit NANOSECONDS
      Serialize as nanoseconds. Never has a fractional part (it's ignored if there is one while parsing).
  • Method Details

    • values

      public static SerdeConfiguration.NumericTimeUnit[] 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 SerdeConfiguration.NumericTimeUnit 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