Package io.micronaut.serde.config
Enum Class SerdeConfiguration.TimeShape
- All Implemented Interfaces:
Serializable
,Comparable<SerdeConfiguration.TimeShape>
,Constable
- Enclosing interface:
- SerdeConfiguration
Shape to use for time serialization.
- 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 ConstantDescriptionSerialize as a decimal value with best possible precision.Serialize as an integer.Serialize as a string, either usingSerdeConfiguration.getDateFormat()
or as an ISO timestamp. -
Method Summary
Modifier and TypeMethodDescriptionstatic SerdeConfiguration.TimeShape
Returns the enum constant of this class with the specified name.static SerdeConfiguration.TimeShape[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
STRING
Serialize as a string, either usingSerdeConfiguration.getDateFormat()
or as an ISO timestamp. -
INTEGER
Serialize as an integer. This exists for compatibility, if possible preferDECIMAL
so that no part of the time component is lost. -
DECIMAL
Serialize as a decimal value with best possible precision.
-
-
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
-