Class ImmutableTaggedAddresses
java.lang.Object
org.kiwiproject.consul.model.catalog.TaggedAddresses
org.kiwiproject.consul.model.catalog.ImmutableTaggedAddresses
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableTaggedAddresses
extends TaggedAddresses
Immutable implementation of
TaggedAddresses.
Use the builder to create immutable instances:
ImmutableTaggedAddresses.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableTaggedAddresses. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableTaggedAddresses.static ImmutableTaggedAddressescopyOf(TaggedAddresses instance) Creates an immutable copy of aTaggedAddressesvalue.booleanThis instance is equal to all instances ofImmutableTaggedAddressesthat have equal attribute values.getLan()getWan()inthashCode()Computes a hash code from attributes:wan,lan.toString()Prints the immutable valueTaggedAddresseswith attribute values.final ImmutableTaggedAddressesCopy the current immutable object by setting a present value for the optionallanattribute.final ImmutableTaggedAddressesCopy the current immutable object by setting an optional value for thelanattribute.final ImmutableTaggedAddressesCopy the current immutable object by setting a value for thewanattribute.
-
Method Details
-
getWan
- Specified by:
getWanin classTaggedAddresses- Returns:
- The value of the
wanattribute
-
getLan
- Specified by:
getLanin classTaggedAddresses- Returns:
- The value of the
lanattribute
-
withWan
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
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
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
This instance is equal to all instances ofImmutableTaggedAddressesthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:wan,lan. -
toString
Prints the immutable valueTaggedAddresseswith attribute values. -
copyOf
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
Creates a builder forImmutableTaggedAddresses.ImmutableTaggedAddresses.builder() .wan(String) // requiredwan.lan(String) // optionallan.build();- Returns:
- A new ImmutableTaggedAddresses builder
-