private static class OffPeakHours.OffPeakHoursImpl extends OffPeakHours
Modifier and Type | Field and Description |
---|---|
(package private) int |
endHour |
(package private) int |
startHour |
DISABLED
Constructor and Description |
---|
OffPeakHoursImpl(int startHour,
int endHour) |
Modifier and Type | Method and Description |
---|---|
boolean |
isOffPeakHour()
Returns whether it is off-peak hour
|
boolean |
isOffPeakHour(int targetHour)
Returns whether
targetHour is off-peak hour |
getInstance, getInstance
OffPeakHoursImpl(int startHour, int endHour)
startHour
- inclusiveendHour
- exclusivepublic boolean isOffPeakHour()
OffPeakHours
isOffPeakHour
in class OffPeakHours
public boolean isOffPeakHour(int targetHour)
OffPeakHours
targetHour
is off-peak hourisOffPeakHour
in class OffPeakHours
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.