Interface DateIntervalConverter
- All Known Implementing Classes:
NextLastIntervalConverter
,PredefinedIntervalConverter
,RelativeIntervalConverter
public interface DateIntervalConverter
Interface provides methods for parsing/formating date interval values.
-
Field Summary
-
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_DESCR
- 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 parameter 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 date interval matches with the value pattern of the converter
-
supports
- Parameters:
type
- date interval type- Returns:
- true if converter supports the given type
-