Class DaysOfWeekTimeWindows
-
- All Implemented Interfaces:
public final class DaysOfWeekTimeWindows
-
-
Field Summary
Fields Modifier and Type Field Description private final Array<TimeWindow>timeWindowsprivate final Set<DayOfWeek>daysOfWeek
-
Constructor Summary
Constructors Constructor Description DaysOfWeekTimeWindows(Set<DayOfWeek> daysOfWeek, Set<TimeWindow> _timeWindows)
-
Method Summary
Modifier and Type Method Description final Array<TimeWindow>getTimeWindows()final Set<DayOfWeek>getDaysOfWeek()final LongtimeMsUntilTargetTimeIntervalEnd(Long dayTimeOffsetMillis)final LongtimeMsUntilTargetTimeIntervalStart(Long dayTimeOffestMillis)-
-
Constructor Detail
-
DaysOfWeekTimeWindows
DaysOfWeekTimeWindows(Set<DayOfWeek> daysOfWeek, Set<TimeWindow> _timeWindows)
-
-
Method Detail
-
getTimeWindows
final Array<TimeWindow> getTimeWindows()
-
getDaysOfWeek
final Set<DayOfWeek> getDaysOfWeek()
-
timeMsUntilTargetTimeIntervalEnd
final Long timeMsUntilTargetTimeIntervalEnd(Long dayTimeOffsetMillis)
- Parameters:
dayTimeOffsetMillis- number of milliseconds elapsed from the beginning of the day, think about this as LocalTime raw representation- Returns:
a positive value if there is a configured time window which contains the given point of time. Returned value contains a number of milliseconds beofre the time window end;
non-positive value as an indication that given point of time doesn't belong to any configured time window
-
timeMsUntilTargetTimeIntervalStart
final Long timeMsUntilTargetTimeIntervalStart(Long dayTimeOffestMillis)
- Returns:
a positive value if there is a configured time window which starts after the given point of time. Returned value contains a number of milliseconds before that time window;
zero as an indication that there is a configured time window which contains given point of time; negative value as an indication that there is no time window which contains given point of time or starts after it
-
-
-
-