@NotThreadSafe public static final class ImmutablePorts.Builder extends Object
ImmutablePorts.
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 |
|---|---|
ImmutablePorts |
build()
Builds a new
ImmutablePorts. |
ImmutablePorts.Builder |
dns(int dns)
Initializes the value for the
dns attribute. |
ImmutablePorts.Builder |
from(Ports instance)
Fill a builder with attribute values from the provided
Ports instance. |
ImmutablePorts.Builder |
http(int http)
Initializes the value for the
http attribute. |
ImmutablePorts.Builder |
rpc(int rpc)
Initializes the value for the
rpc attribute. |
ImmutablePorts.Builder |
serfLan(int serfLan)
Initializes the value for the
serfLan attribute. |
ImmutablePorts.Builder |
serfWan(int serfWan)
Initializes the value for the
serfWan attribute. |
ImmutablePorts.Builder |
server(int server)
Initializes the value for the
server attribute. |
public final ImmutablePorts.Builder from(Ports instance)
Ports 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 ImmutablePorts.Builder dns(int dns)
dns attribute.dns - The value for dnsthis builder for use in a chained invocationpublic final ImmutablePorts.Builder http(int http)
http attribute.http - The value for httpthis builder for use in a chained invocationpublic final ImmutablePorts.Builder rpc(int rpc)
rpc attribute.rpc - The value for rpcthis builder for use in a chained invocationpublic final ImmutablePorts.Builder serfLan(int serfLan)
serfLan attribute.serfLan - The value for serfLanthis builder for use in a chained invocationpublic final ImmutablePorts.Builder serfWan(int serfWan)
serfWan attribute.serfWan - The value for serfWanthis builder for use in a chained invocationpublic final ImmutablePorts.Builder server(int server)
server attribute.server - The value for serverthis builder for use in a chained invocationpublic ImmutablePorts build()
ImmutablePorts.IllegalStateException - if any required attributes are missingCopyright © 2018. All rights reserved.