Represents the opening or closing details for a Period
.
Nested Class Summary
class | TimeOfWeek.Builder | Builder for TimeOfWeek . |
Inherited Constant Summary
Public Constructor Summary
Public Method Summary
static TimeOfWeek.Builder | |
abstract LocalDate | |
abstract DayOfWeek |
getDay()
Returns the day of the week.
|
abstract LocalTime |
getTime()
Returns the time in 24 hour format, for example "1730", or "0000"
|
abstract boolean |
isTruncated()
Returns whether or not the opening or close details were truncated due to the seven day window,
where the window starts at midnight of the day of the request, and ends at 11:59 pm six days
later.
|
static TimeOfWeek |
Inherited Method Summary
Public Constructors
public TimeOfWeek ()
Public Methods
public static TimeOfWeek.Builder builder (DayOfWeek day, LocalTime localTime)
Returns a TimeOfWeek.Builder
initialized with the specified DayOfWeek
and
LocalTime
.
Parameters
day | |
---|---|
localTime |
public abstract LocalDate getDate ()
Returns the LocalDate
of the opening or close details.
Only set in Place.getCurrentOpeningHours()
& Place.getSecondaryOpeningHours()
, and returns null
in Place.getOpeningHours()
.
public abstract LocalTime getTime ()
Returns the time in 24 hour format, for example "1730", or "0000"
public abstract boolean isTruncated ()
Returns whether or not the opening or close details were truncated due to the seven day window, where the window starts at midnight of the day of the request, and ends at 11:59 pm six days later.
Returns true if the open or close times for this period extends past this seven day window.
Will only be true
in Place.getCurrentOpeningHours()
& Place.getSecondaryOpeningHours()
contexts.
public static TimeOfWeek newInstance (DayOfWeek day, LocalTime localTime)
Returns an instance of TimeOfWeek
.
date
& truncated
will be set to their default values, null
& false
, respectively. Use builder(DayOfWeek, LocalTime)
if date
&
truncated
values need to be set.
Parameters
day | |
---|---|
localTime |