Package com.orbitz.consul.model.catalog
Class ImmutableTaggedAddresses.Builder
- java.lang.Object
-
- com.orbitz.consul.model.catalog.ImmutableTaggedAddresses.Builder
-
- Enclosing class:
- ImmutableTaggedAddresses
@NotThreadSafe public static final class ImmutableTaggedAddresses.Builder extends java.lang.ObjectBuilds instances of typeImmutableTaggedAddresses. Initialize attributes and then invoke thebuild()method to create an immutable instance.Builderis not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.
-
-
Method Summary
Modifier and Type Method Description ImmutableTaggedAddressesbuild()Builds a newImmutableTaggedAddresses.ImmutableTaggedAddresses.Builderfrom(TaggedAddresses instance)Fill a builder with attribute values from the providedTaggedAddressesinstance.ImmutableTaggedAddresses.Builderlan(java.lang.String lan)Initializes the optional valuelanto lan.ImmutableTaggedAddresses.Builderlan(java.util.Optional<java.lang.String> lan)Initializes the optional valuelanto lan.ImmutableTaggedAddresses.Builderwan(java.lang.String wan)Initializes the value for thewanattribute.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableTaggedAddresses.Builder from(TaggedAddresses instance)
Fill a builder with attribute values from the providedTaggedAddressesinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
wan
@CanIgnoreReturnValue public final ImmutableTaggedAddresses.Builder wan(java.lang.String wan)
Initializes the value for thewanattribute.- Parameters:
wan- The value for wan- Returns:
thisbuilder for use in a chained invocation
-
lan
@CanIgnoreReturnValue public final ImmutableTaggedAddresses.Builder lan(java.lang.String lan)
Initializes the optional valuelanto lan.- Parameters:
lan- The value for lan- Returns:
thisbuilder for chained invocation
-
lan
@CanIgnoreReturnValue public final ImmutableTaggedAddresses.Builder lan(java.util.Optional<java.lang.String> lan)
Initializes the optional valuelanto lan.- Parameters:
lan- The value for lan- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableTaggedAddresses build()
Builds a newImmutableTaggedAddresses.- Returns:
- An immutable instance of TaggedAddresses
- Throws:
java.lang.IllegalStateException- if any required attributes are missing
-
-