OpeningHours.Builder

public abstract class OpeningHours.Builder


Builder for OpeningHours.

All values are optional. If they are not specified, the resulting OpeningHours object will use empty Lists.

Summary

Public constructors

Public constructors

Builder

public Builder()

Public methods

build

public OpeningHours build()

Builds the OpeningHours.

Mutable members (e.g List) will be converted to immutable versions.

Throws
java.lang.IllegalArgumentException

If weekdayText contains null or empty values.

getHoursType

public abstract @Nullable OpeningHours.HoursType getHoursType()

getPeriods

public abstract List<PeriodgetPeriods()

getSpecialDays

public abstract List<SpecialDaygetSpecialDays()

getWeekdayText

public abstract List<StringgetWeekdayText()

setHoursType

public abstract OpeningHours.Builder setHoursType(@Nullable OpeningHours.HoursType hoursType)

setPeriods

public abstract OpeningHours.Builder setPeriods(List<Period> periods)

setSpecialDays

public abstract OpeningHours.Builder setSpecialDays(List<SpecialDay> specialDays)

setWeekdayText

public abstract OpeningHours.Builder setWeekdayText(List<String> weekdayText)