T - generic type of timepoints on the underlying timelinepublic static class CalendarPeriod.Factory<T> extends CalendarPeriod.Parser<T>
Serves for the creation of generic calendar intervals on a timeline.
| Modifier and Type | Method and Description |
|---|---|
CalendarPeriod<T> |
between(T start,
T end)
Creates a closed interval between given calendrical timepoints.
|
CalendarPeriod<T> |
parse(CharSequence text,
ChronoParser<T> parser,
String intervalPattern)
Interpretes given text as interval using given interval pattern.
|
parsepublic CalendarPeriod<T> between(T start, T end)
start - the start of intervalend - the end of interval (inclusive)public CalendarPeriod<T> parse(CharSequence text, ChronoParser<T> parser, String intervalPattern) throws ParseException
CalendarPeriod.ParserInterpretes given text as interval using given interval pattern.
It is also possible to use an or-pattern logic. Example
see DateInterval.parse(String, ChronoParser, String).
parse in class CalendarPeriod.Parser<T>text - text to be parsedparser - format object for parsing start and end componentsintervalPattern - interval pattern containing placeholders {0} and {1} (for start and end)ParseException - if the text is not parseableCopyright © 2014–2021. All rights reserved.