# Uses of Enum Class
org.springframework.format.annotation.DurationFormat.Style

Packages that use DurationFormat.Style
Package
Description
org.springframework.format.annotation
Annotations for declaratively configuring field and parameter formatting rules.
org.springframework.format.datetime.standard
Integration with the JSR-310 `java.time` package in JDK 8.

## Uses of DurationFormat.Style in org.springframework.format.annotation

Methods in org.springframework.format.annotation that return DurationFormat.Style
Modifier and Type
Method
Description
`static DurationFormat.Style`
DurationFormat.Style.`valueOf(String name)`
Returns the enum constant of this class with the specified name.
`static DurationFormat.Style[]`
DurationFormat.Style.`values()`
Returns an array containing the constants of this enum class, in the order they are declared.

## Uses of DurationFormat.Style in org.springframework.format.datetime.standard

Methods in org.springframework.format.datetime.standard that return DurationFormat.Style
Modifier and Type
Method
Description
`static DurationFormat.Style`
DurationFormatterUtils.`detect(String value)`
Detect the style from the given source value.
Methods in org.springframework.format.datetime.standard with parameters of type DurationFormat.Style
Modifier and Type
Method
Description
`static Duration`
DurationFormatterUtils.`parse(String value, DurationFormat.Style style)`
Parse the given value to 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)`
Print the specified duration in the specified style.
`static String`
DurationFormatterUtils.`print(Duration value, DurationFormat.Style style, DurationFormat.Unit unit)`
Print the specified duration in the specified style using the given unit.
Constructors in org.springframework.format.datetime.standard with parameters of type DurationFormat.Style
Modifier
Constructor
Description
``
`DurationFormatter(DurationFormat.Style style)`
Create a `DurationFormatter` in a specific `DurationFormat.Style`.
``
`DurationFormatter(DurationFormat.Style style, DurationFormat.Unit defaultUnit)`
Create a `DurationFormatter` in a specific `DurationFormat.Style` with an optional `DurationFormat.Unit`.