public static abstract class
OpeningHours.Builder
extends Object
Builder for OpeningHours
.
All values are optional. If they are not specified, the resulting OpeningHours
object will use empty Lists.
Public Constructor Summary
Builder()
|
Public Method Summary
OpeningHours |
build()
Builds the
OpeningHours . |
abstract OpeningHours.HoursType | |
abstract List<Period> | |
abstract List<SpecialDay> | |
abstract List<String> | |
abstract OpeningHours.Builder |
setHoursType(OpeningHours.HoursType hoursType)
|
abstract OpeningHours.Builder | |
abstract OpeningHours.Builder | |
abstract OpeningHours.Builder |
Inherited Method Summary
Public Constructors
public Builder ()
Public Methods
public OpeningHours build ()
Builds the OpeningHours
.
Mutable members (e.g List) will be converted to immutable versions.
Throws
IllegalStateException | If weekdayText contains null or empty values.
|
---|
public abstract OpeningHours.Builder setHoursType (OpeningHours.HoursType hoursType)
Parameters
hoursType |
---|
public abstract OpeningHours.Builder setSpecialDays (List<SpecialDay> specialDays)
Parameters
specialDays |
---|
public abstract OpeningHours.Builder setWeekdayText (List<String> weekdayText)
Parameters
weekdayText |
---|