Package org.kigalisim.lang.time
Class ParsedDuring
java.lang.Object
org.kigalisim.lang.time.ParsedDuring
Description of a "during" time period described in QubecTalk.
Description of a "during" time period described in QubecTalk where the following are
observed:
- Single year ranges should have both start and end with the same TimePoints.
- A range which should apply starting in a year until the end may have start be non-empty and the end is empty. Alternatively, start may be given and empty be onwards (dynamic cap).
- A range which should apply until a given year may have start be non-empty an the start is empty. Alternatively, end may be given and start be beginning (dynamic cap).
- Other ranges may have start and end both specified.
-
Constructor Summary
ConstructorsConstructorDescriptionParsedDuring(Optional<TimePointFuture> start, Optional<TimePointFuture> end) Create a description of a "during" time period. -
Method Summary
Modifier and TypeMethodDescriptionbuildYearMatcher(PushDownMachine machine) Build a YearMatcher from this parsed version of a during statement.getEnd()Get the end of the period.getStart()Get the start of the period.
-
Constructor Details
-
ParsedDuring
Create a description of a "during" time period.- Parameters:
start- The start of the period, or empty if unbounded.end- The end of the period, or empty if unbounded.
-
-
Method Details
-
getStart
Get the start of the period.- Returns:
- The start of the period, or empty if unbounded.
-
getEnd
Get the end of the period.- Returns:
- The end of the period, or empty if unbounded.
-
buildYearMatcher
Build a YearMatcher from this parsed version of a during statement.If a TimePointFuture is a dynamic cap (beginning or onwards), it is interpreted as Optional.empty().
- Parameters:
machine- Machine to use for calculations if needed.- Returns:
- The YearMatcher built from the values parsed and saved to this ParsedDuring.
-