Interface DateIntervalConverter
- All Known Implementing Classes:
NextLastIntervalConverter
,PredefinedIntervalConverter
,RelativeIntervalConverter
public interface DateIntervalConverter
Interface provides methods for parsing/formatting date interval values.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionformat
(BaseDateInterval dateInterval) Formats date interval to string presentation.getLocalizedValue
(BaseDateInterval dateInterval) Formats date interval and gets localized value.boolean
Checks that provided date interval matches with converter's value pattern.Parses string presentation of date interval toBaseDateInterval
.boolean
-
Field Details
-
INCLUDING_CURRENT_DESCRIPTION
- See Also:
-
-
Method Details
-
parse
Parses string presentation of date interval toBaseDateInterval
.- Parameters:
dateInterval
- string presentation of date interval- Returns:
- configured date interval or null if input parameters is null or empty.
-
format
Formats date interval to string presentation.- Parameters:
dateInterval
- date interval instance- Returns:
- raw presentation of date interval
-
getLocalizedValue
Formats date interval and gets localized value.- Parameters:
dateInterval
- date interval instance- Returns:
- localized value
-
matches
Checks that provided date interval matches with converter's value pattern.- Parameters:
dateInterval
- string presentation of date interval- Returns:
true
if provided data interval matches with the value pattern of the converter,false
otherwise
-
supports
- Parameters:
type
- date interval type- Returns:
true
if converter supports the given type,false
otherwise
-