@NotThreadSafe public static final class ImmutableDailySchedule.Builder extends Object
ImmutableDailySchedule
.
Initialize attributes and then invoke the build()
method to create an
immutable instance.
Builder
is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
Modifier and Type | Method and Description |
---|---|
ImmutableDailySchedule.Builder |
addAllDays(Iterable<Day> elements)
Adds elements to
days set. |
ImmutableDailySchedule.Builder |
addDays(Day... elements)
Adds elements to
days set. |
ImmutableDailySchedule.Builder |
addDays(Day element)
Adds one element to
days set. |
ImmutableDailySchedule |
build()
Builds a new
ImmutableDailySchedule . |
ImmutableDailySchedule.Builder |
days(Iterable<Day> elements)
Sets or replaces all elements for
days set. |
ImmutableDailySchedule.Builder |
from(DailySchedule instance)
Fill a builder with attribute values from the provided
DailySchedule instance. |
public final ImmutableDailySchedule.Builder from(DailySchedule instance)
DailySchedule
instance.
Regular attribute values will be replaced with those from the given instance.
Absent optional values will not replace present values.
Collection elements and entries will be added, not replaced.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final ImmutableDailySchedule.Builder addDays(Day element)
days
set.element
- A days elementthis
builder for use in a chained invocationpublic final ImmutableDailySchedule.Builder addDays(Day... elements)
days
set.elements
- An array of days elementsthis
builder for use in a chained invocationpublic final ImmutableDailySchedule.Builder days(Iterable<Day> elements)
days
set.elements
- An iterable of days elementsthis
builder for use in a chained invocationpublic final ImmutableDailySchedule.Builder addAllDays(Iterable<Day> elements)
days
set.elements
- An iterable of days elementsthis
builder for use in a chained invocationpublic ImmutableDailySchedule build()
ImmutableDailySchedule
.IllegalStateException
- if any required attributes are missingCopyright © 2023 iland Internet Solutions, Corp. All rights reserved.