Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public String print(Duration value) {
* Detect the style then parse the value to return a duration.
* @param value the value to parse
* @return the parsed duration
* @throws IllegalStateException 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);
Expand All @@ -146,7 +146,7 @@ public static Duration detectAndParse(String value) {
* @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 IllegalStateException 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);
Expand All @@ -156,7 +156,7 @@ public static Duration detectAndParse(String value, ChronoUnit unit) {
* Detect the style from the given source value.
* @param value the source value
* @return the duration style
* @throws IllegalStateException if the value is not a known style
* @throws IllegalArgumentException if the value is not a known style
*/
public static DurationStyle detect(String value) {
Assert.notNull(value, "Value must not be null");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ public String print(Period value) {
* Detect the style then parse the value to return a period.
* @param value the value to parse
* @return the parsed period
* @throws IllegalStateException 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);
Expand All @@ -188,7 +188,7 @@ public static Period detectAndParse(String value) {
* @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 IllegalStateException 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);
Expand All @@ -198,7 +198,7 @@ public static Period detectAndParse(String value, ChronoUnit unit) {
* Detect the style from the given source value.
* @param value the source value
* @return the period style
* @throws IllegalStateException if the value is not a known style
* @throws IllegalArgumentException if the value is not a known style
*/
public static PeriodStyle detect(String value) {
Assert.notNull(value, "Value must not be null");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
* @author Eddú Meléndez
* @author Edson Chávez
* @since 2.3.0
* @see Period
* @see PeriodFormat
* @see PeriodUnit
*/
public class PeriodToStringConverter implements GenericConverter {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
* @author Eddú Meléndez
* @author Edson Chávez
* @since 2.3.0
* @see PeriodFormat
* @see PeriodUnit
*/
public class StringToPeriodConverter implements GenericConverter {
Expand Down