@NotThreadSafe public static final class ImmutableTimeOfDay.Builder extends Object
ImmutableTimeOfDay.
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 |
|---|---|
ImmutableTimeOfDay |
build()
Builds a new
ImmutableTimeOfDay. |
ImmutableTimeOfDay.Builder |
from(TimeOfDay instance)
Fill a builder with attribute values from the provided
TimeOfDay instance. |
ImmutableTimeOfDay.Builder |
hour(int hour)
Initializes the value for the
hour attribute. |
ImmutableTimeOfDay.Builder |
minute(int minute)
Initializes the value for the
minute attribute. |
public final ImmutableTimeOfDay.Builder from(TimeOfDay instance)
TimeOfDay instance.
Regular attribute values will be replaced with those from the given instance.
Absent optional values will not replace present values.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final ImmutableTimeOfDay.Builder hour(int hour)
hour attribute.hour - The value for hourthis builder for use in a chained invocationpublic final ImmutableTimeOfDay.Builder minute(int minute)
minute attribute.minute - The value for minutethis builder for use in a chained invocationpublic ImmutableTimeOfDay build()
ImmutableTimeOfDay.IllegalStateException - if any required attributes are missingCopyright © 2023 iland Internet Solutions, Corp. All rights reserved.