@NotThreadSafe public static final class ImmutableMember.Builder extends Object
ImmutableMember.
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 |
|---|---|
ImmutableMember.Builder |
address(String address)
Initializes the value for the
address attribute. |
ImmutableMember |
build()
Builds a new
ImmutableMember. |
ImmutableMember.Builder |
delegateCur(int delegateCur)
Initializes the value for the
delegateCur attribute. |
ImmutableMember.Builder |
delegateMax(int delegateMax)
Initializes the value for the
delegateMax attribute. |
ImmutableMember.Builder |
delegateMin(int delegateMin)
Initializes the value for the
delegateMin attribute. |
ImmutableMember.Builder |
from(Member instance)
Fill a builder with attribute values from the provided
Member instance. |
ImmutableMember.Builder |
name(String name)
Initializes the value for the
name attribute. |
ImmutableMember.Builder |
port(int port)
Initializes the value for the
port attribute. |
ImmutableMember.Builder |
protocolCur(int protocolCur)
Initializes the value for the
protocolCur attribute. |
ImmutableMember.Builder |
protocolMax(int protocolMax)
Initializes the value for the
protocolMax attribute. |
ImmutableMember.Builder |
protocolMin(int protocolMin)
Initializes the value for the
protocolMin attribute. |
ImmutableMember.Builder |
putAllTags(Map<String,? extends String> entries)
Put all mappings from the specified map as entries to
tags map. |
ImmutableMember.Builder |
putTags(Map.Entry<String,? extends String> entry)
Put one entry to the
tags map. |
ImmutableMember.Builder |
putTags(String key,
String value)
Put one entry to the
tags map. |
ImmutableMember.Builder |
status(int status)
Initializes the value for the
status attribute. |
ImmutableMember.Builder |
tags(Map<String,? extends String> entries)
Sets or replaces all mappings from the specified map as entries for the
tags map. |
@CanIgnoreReturnValue public final ImmutableMember.Builder from(Member instance)
Member 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 invocation@CanIgnoreReturnValue public final ImmutableMember.Builder name(String name)
name attribute.name - The value for namethis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableMember.Builder address(String address)
address attribute.address - The value for addressthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableMember.Builder port(int port)
port attribute.port - The value for portthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableMember.Builder putTags(String key, String value)
tags map.key - The key in the tags mapvalue - The associated value in the tags mapthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableMember.Builder putTags(Map.Entry<String,? extends String> entry)
tags map. Nulls are not permittedentry - The key and value entrythis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableMember.Builder tags(Map<String,? extends String> entries)
tags map. Nulls are not permittedentries - The entries that will be added to the tags mapthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableMember.Builder putAllTags(Map<String,? extends String> entries)
tags map. Nulls are not permittedentries - The entries that will be added to the tags mapthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableMember.Builder status(int status)
status attribute.status - The value for statusthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableMember.Builder protocolMin(int protocolMin)
protocolMin attribute.protocolMin - The value for protocolMinthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableMember.Builder protocolMax(int protocolMax)
protocolMax attribute.protocolMax - The value for protocolMaxthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableMember.Builder protocolCur(int protocolCur)
protocolCur attribute.protocolCur - The value for protocolCurthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableMember.Builder delegateMin(int delegateMin)
delegateMin attribute.delegateMin - The value for delegateMinthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableMember.Builder delegateMax(int delegateMax)
delegateMax attribute.delegateMax - The value for delegateMaxthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableMember.Builder delegateCur(int delegateCur)
delegateCur attribute.delegateCur - The value for delegateCurthis builder for use in a chained invocationpublic ImmutableMember build()
ImmutableMember.IllegalStateException - if any required attributes are missingCopyright © 2019. All rights reserved.