Package com.yahoo.config.application.api
Class TimeWindow
- java.lang.Object
-
- com.yahoo.config.application.api.TimeWindow
-
public class TimeWindow extends Object
This class represents a window of time for selected hours on selected days.- Author:
- mpolden
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description List<DayOfWeek>
days()
Returns days in this time windowstatic TimeWindow
from(String daySpec, String hourSpec, String zoneSpec)
Parse a time window from the given day, hour and time zone specificationList<Integer>
hours()
Returns hours in this time windowboolean
includes(Instant instant)
Returns whether the given instant is in this time windowString
toString()
ZoneId
zone()
Returns the time zone of this time window
-
-
-
Method Detail
-
zone
public ZoneId zone()
Returns the time zone of this time window
-
includes
public boolean includes(Instant instant)
Returns whether the given instant is in this time window
-
from
public static TimeWindow from(String daySpec, String hourSpec, String zoneSpec)
Parse a time window from the given day, hour and time zone specification
-
-