Annotation Interface DurationFormat
@Documented
@Retention(RUNTIME)
@Target({METHOD,FIELD,PARAMETER,ANNOTATION_TYPE})
public @interface DurationFormat
Declares that a field or method parameter should be formatted as a
Duration, according to the specified Style
and Unit.- Since:
- 6.2
- Author:
- Simon Baslé
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic enumDurationformat styles.static enumDurationformat unit, which mirrors a subset ofChronoUnitand allows conversion to and from a supportedChronoUnitas well as conversion from durations to longs.
- 
Optional Element SummaryOptional ElementsModifier and TypeOptional ElementDescriptionTheDurationFormat.Unitto fall back to in case theStyleneeds a unit for either parsing or printing, and none is explicitly provided in the input.TheDurationFormat.Styleto use for parsing and printing aDuration.
- 
Element Details- 
styleDurationFormat.Style styleTheDurationFormat.Styleto use for parsing and printing aDuration.Defaults to the JDK style ( DurationFormat.Style.ISO8601).- Default:
- ISO8601
 
- 
defaultUnitDurationFormat.Unit defaultUnitTheDurationFormat.Unitto fall back to in case theStyleneeds a unit for either parsing or printing, and none is explicitly provided in the input.Defaults to DurationFormat.Unit.MILLISif unspecified.- Default:
- MILLIS
 
 
-