@NotThreadSafe public static final class ImmutableActor.Builder extends Object
ImmutableActor.
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 |
|---|---|
ImmutableActor |
build()
Builds a new
ImmutableActor. |
ImmutableActor.Builder |
from(Actor instance)
Fill a builder with attribute values from the provided
Actor instance. |
ImmutableActor.Builder |
roleName(String roleName)
Initializes the value for the
roleName attribute. |
@CanIgnoreReturnValue public final ImmutableActor.Builder from(Actor instance)
Actor 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 invocation@CanIgnoreReturnValue public final ImmutableActor.Builder roleName(String roleName)
roleName attribute.roleName - The value for roleNamethis builder for use in a chained invocationpublic ImmutableActor build()
ImmutableActor.IllegalStateException - if any required attributes are missingCopyright © 2022. All rights reserved.