Class ScheduleImpl
-
- All Implemented Interfaces:
-
tech.harmonysoft.oss.common.time.schedule.Schedule
public final class ScheduleImpl implements Schedule
-
-
Field Summary
Fields Modifier and Type Field Description private final ClockProviderclockProviderprivate final Collection<DaysOfWeekTimeWindows>dayTimeWindows
-
Constructor Summary
Constructors Constructor Description ScheduleImpl(ClockProvider clockProvider, Collection<DaysOfWeekTimeWindows> dayTimeWindows)
-
Method Summary
Modifier and Type Method Description final ClockProvidergetClockProvider()final Collection<DaysOfWeekTimeWindows>getDayTimeWindows()LongtimeMsUntilTargetTimeIntervalStart(LocalDateTime dateTime)LongtimeMsUntilTargetTimeIntervalStart(Long timeMillis)LongtimeMsUntilTargetTimeIntervalEnd(LocalDateTime dateTime)LongtimeMsUntilTargetTimeIntervalEnd(Long timeMillis)-
-
Constructor Detail
-
ScheduleImpl
ScheduleImpl(ClockProvider clockProvider, Collection<DaysOfWeekTimeWindows> dayTimeWindows)
-
-
Method Detail
-
getClockProvider
final ClockProvider getClockProvider()
-
getDayTimeWindows
final Collection<DaysOfWeekTimeWindows> getDayTimeWindows()
-
timeMsUntilTargetTimeIntervalStart
Long timeMsUntilTargetTimeIntervalStart(LocalDateTime dateTime)
- Returns:
non-positive value as an indication that given point of time is already covered by the current schedule; a positive value of milliseconds remaining for the closest time window defined by the current schedule
-
timeMsUntilTargetTimeIntervalStart
Long timeMsUntilTargetTimeIntervalStart(Long timeMillis)
- Returns:
non-positive value as an indication that given point of time is already covered by the current schedule; a positive value of milliseconds remaining for the closest time window defined by the current schedule
-
timeMsUntilTargetTimeIntervalEnd
Long timeMsUntilTargetTimeIntervalEnd(LocalDateTime dateTime)
- Returns:
non-positive value as an indication that given point of time is not within the current schedule; a positive value of milliseconds remaining until the target active time interval end
-
timeMsUntilTargetTimeIntervalEnd
Long timeMsUntilTargetTimeIntervalEnd(Long timeMillis)
- Returns:
non-positive value as an indication that given point of time is not within the current schedule; a positive value of milliseconds remaining until the target active time interval end
-
-
-
-