Annotation Interface DurationFormat


Declares that a field or method parameter should be formatted as a Duration, according to the specified style.
Since:
6.2
Author:
Simon Baslé
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    Duration format styles.
    static enum 
    Duration format unit, which mirrors a subset of ChronoUnit and allows conversion to and from supported ChronoUnit as well as converting durations to longs.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Define which DurationFormat.Unit to fall back to in case the style() needs a unit for either parsing or printing, and none is explicitly provided in the input (Unit.MILLIS if unspecified).
    Which Style to use for parsing and printing a Duration.
  • Element Details