Package io.micronaut.serde.config
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
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionLegacy unit for compatibility with documents created by micronaut-serialization 1.x (micronaut-core 3.x).Serialize as milliseconds.Serialize as nanoseconds.Serialize as seconds, the default. -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this class with the specified name.static SerdeConfiguration.NumericTimeUnit[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
LEGACY
Legacy unit for compatibility with documents created by micronaut-serialization 1.x (micronaut-core 3.x). -
SECONDS
Serialize as seconds, the default. Nanoseconds may still be represented as the fractional part. -
MILLISECONDS
Serialize as milliseconds. Nanoseconds may still be represented as the fractional part. -
NANOSECONDS
Serialize as nanoseconds. Never has a fractional part (it's ignored if there is one while parsing).
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-