mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Polish "Polish duration support javadoc"
See gh-21579
This commit is contained in:
parent
1a87fce416
commit
b21c09020d
@ -134,7 +134,8 @@ public enum DurationStyle {
|
||||
* Detect the style then parse the value to return a duration.
|
||||
* @param value the value to parse
|
||||
* @return the parsed duration
|
||||
* @throws IllegalArgumentException if the value is not a known style or cannot be parsed
|
||||
* @throws IllegalArgumentException if the value is not a known style or cannot be
|
||||
* parsed
|
||||
*/
|
||||
public static Duration detectAndParse(String value) {
|
||||
return detectAndParse(value, null);
|
||||
@ -146,7 +147,8 @@ public enum DurationStyle {
|
||||
* @param unit the duration unit to use if the value doesn't specify one ({@code null}
|
||||
* will default to ms)
|
||||
* @return the parsed duration
|
||||
* @throws IllegalArgumentException if the value is not a known style or cannot be parsed
|
||||
* @throws IllegalArgumentException if the value is not a known style or cannot be
|
||||
* parsed
|
||||
*/
|
||||
public static Duration detectAndParse(String value, ChronoUnit unit) {
|
||||
return detect(value).parse(value, unit);
|
||||
|
@ -176,7 +176,8 @@ public enum PeriodStyle {
|
||||
* Detect the style then parse the value to return a period.
|
||||
* @param value the value to parse
|
||||
* @return the parsed period
|
||||
* @throws IllegalArgumentException if the value is not a known style or cannot be parsed
|
||||
* @throws IllegalArgumentException if the value is not a known style or cannot be
|
||||
* parsed
|
||||
*/
|
||||
public static Period detectAndParse(String value) {
|
||||
return detectAndParse(value, null);
|
||||
@ -188,7 +189,8 @@ public enum PeriodStyle {
|
||||
* @param unit the period unit to use if the value doesn't specify one ({@code null}
|
||||
* will default to ms)
|
||||
* @return the parsed period
|
||||
* @throws IllegalArgumentException if the value is not a known style or cannot be parsed
|
||||
* @throws IllegalArgumentException if the value is not a known style or cannot be
|
||||
* parsed
|
||||
*/
|
||||
public static Period detectAndParse(String value, ChronoUnit unit) {
|
||||
return detect(value).parse(value, unit);
|
||||
|
Loading…
Reference in New Issue
Block a user