@NotThreadSafe public static final class ImmutableAgent.Builder extends Object
ImmutableAgent.
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 |
|---|---|
ImmutableAgent |
build()
Builds a new
ImmutableAgent. |
ImmutableAgent.Builder |
config(Config config)
Initializes the value for the
config attribute. |
ImmutableAgent.Builder |
debugConfig(DebugConfig debugConfig)
Initializes the value for the
debugConfig attribute. |
ImmutableAgent.Builder |
from(Agent instance)
Fill a builder with attribute values from the provided
Agent instance. |
ImmutableAgent.Builder |
member(Member member)
Initializes the value for the
member attribute. |
public final ImmutableAgent.Builder from(Agent instance)
Agent 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 ImmutableAgent.Builder config(Config config)
config attribute.config - The value for configthis builder for use in a chained invocationpublic final ImmutableAgent.Builder debugConfig(@Nullable DebugConfig debugConfig)
debugConfig attribute.debugConfig - The value for debugConfig (can be null)this builder for use in a chained invocationpublic final ImmutableAgent.Builder member(Member member)
member attribute.member - The value for memberthis builder for use in a chained invocationpublic ImmutableAgent build()
ImmutableAgent.IllegalStateException - if any required attributes are missingCopyright © 2018. All rights reserved.