Uses of Enum Class
org.springframework.format.annotation.DurationFormat.Unit
Package
Description
Annotations for declaratively configuring field formatting rules.
Integration with the JSR-310
java.time
package in JDK 8.-
Uses of DurationFormat.Unit in org.springframework.format.annotation
Modifier and TypeMethodDescriptionstatic DurationFormat.Unit
DurationFormat.Unit.fromChronoUnit
(ChronoUnit chronoUnit) Get theUnit
corresponding to the givenChronoUnit
.static DurationFormat.Unit
DurationFormat.Unit.fromSuffix
(String suffix) Get theUnit
corresponding to the givenString
suffix.static DurationFormat.Unit
Returns the enum constant of this class with the specified name.static DurationFormat.Unit[]
DurationFormat.Unit.values()
Returns an array containing the constants of this enum class, in the order they are declared. -
Uses of DurationFormat.Unit in org.springframework.format.datetime.standard
Modifier and TypeMethodDescriptionstatic Duration
DurationFormatterUtils.detectAndParse
(String value, DurationFormat.Unit unit) Detect the style then parse the value to return a duration.static Duration
DurationFormatterUtils.parse
(String value, DurationFormat.Style style, DurationFormat.Unit unit) Parse the given value to a duration.static String
DurationFormatterUtils.print
(Duration value, DurationFormat.Style style, DurationFormat.Unit unit) Print the specified duration in the specified style using the given unit.ModifierConstructorDescriptionDurationFormatter
(DurationFormat.Style style, DurationFormat.Unit defaultUnit)