Package com.orbitz.consul.model.catalog
Class ImmutableTaggedAddresses
- java.lang.Object
-
- com.orbitz.consul.model.catalog.TaggedAddresses
-
- com.orbitz.consul.model.catalog.ImmutableTaggedAddresses
-
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableTaggedAddresses extends TaggedAddressesImmutable implementation ofTaggedAddresses.Use the builder to create immutable instances:
ImmutableTaggedAddresses.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableTaggedAddresses.BuilderBuilds instances of typeImmutableTaggedAddresses.
-
Method Summary
Modifier and Type Method Description static ImmutableTaggedAddresses.Builderbuilder()Creates a builder forImmutableTaggedAddresses.static ImmutableTaggedAddressescopyOf(TaggedAddresses instance)Creates an immutable copy of aTaggedAddressesvalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofImmutableTaggedAddressesthat have equal attribute values.java.util.Optional<java.lang.String>getLan()java.lang.StringgetWan()inthashCode()Computes a hash code from attributes:wan,lan.java.lang.StringtoString()Prints the immutable valueTaggedAddresseswith attribute values.ImmutableTaggedAddresseswithLan(java.lang.String value)Copy the current immutable object by setting a present value for the optionallanattribute.ImmutableTaggedAddresseswithLan(java.util.Optional<java.lang.String> optional)Copy the current immutable object by setting an optional value for thelanattribute.ImmutableTaggedAddresseswithWan(java.lang.String value)Copy the current immutable object by setting a value for thewanattribute.
-
-
-
Method Detail
-
getWan
public java.lang.String getWan()
- Specified by:
getWanin classTaggedAddresses- Returns:
- The value of the
wanattribute
-
getLan
public java.util.Optional<java.lang.String> getLan()
- Specified by:
getLanin classTaggedAddresses- Returns:
- The value of the
lanattribute
-
withWan
public final ImmutableTaggedAddresses withWan(java.lang.String value)
Copy the current immutable object by setting a value for thewanattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for wan- Returns:
- A modified copy of the
thisobject
-
withLan
public final ImmutableTaggedAddresses withLan(java.lang.String value)
Copy the current immutable object by setting a present value for the optionallanattribute.- Parameters:
value- The value for lan- Returns:
- A modified copy of
thisobject
-
withLan
public final ImmutableTaggedAddresses withLan(java.util.Optional<java.lang.String> optional)
Copy the current immutable object by setting an optional value for thelanattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for lan- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable java.lang.Object another)This instance is equal to all instances ofImmutableTaggedAddressesthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()
Computes a hash code from attributes:wan,lan.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueTaggedAddresseswith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
copyOf
public static ImmutableTaggedAddresses copyOf(TaggedAddresses instance)
Creates an immutable copy of aTaggedAddressesvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable TaggedAddresses instance
-
builder
public static ImmutableTaggedAddresses.Builder builder()
Creates a builder forImmutableTaggedAddresses.ImmutableTaggedAddresses.builder() .wan(String) // requiredwan.lan(String) // optionallan.build();- Returns:
- A new ImmutableTaggedAddresses builder
-
-