@ParametersAreNonnullByDefault @Generated(value={"Immutables.generator","ServiceHealthKey"}) @Immutable public final class ImmutableServiceHealthKey extends ServiceHealthKey
ServiceHealthKey.
Use the builder to create immutable instances:
ImmutableServiceHealthKey.builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableServiceHealthKey.Builder
Builds instances of type
ImmutableServiceHealthKey. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableServiceHealthKey.Builder |
builder()
Creates a builder for
ImmutableServiceHealthKey. |
static ImmutableServiceHealthKey |
copyOf(ServiceHealthKey instance)
Creates an immutable copy of a
ServiceHealthKey value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableServiceHealthKey that have equal attribute values. |
String |
getHost() |
Integer |
getPort() |
String |
getServiceId() |
int |
hashCode()
Computes a hash code from attributes:
serviceId, host, port. |
String |
toString()
Prints the immutable value
ServiceHealthKey with attribute values. |
ImmutableServiceHealthKey |
withHost(String value)
Copy the current immutable object by setting a value for the
host attribute. |
ImmutableServiceHealthKey |
withPort(Integer value)
Copy the current immutable object by setting a value for the
port attribute. |
ImmutableServiceHealthKey |
withServiceId(String value)
Copy the current immutable object by setting a value for the
serviceId attribute. |
fromServiceHealth, ofpublic String getServiceId()
getServiceId in class ServiceHealthKeyserviceId attributepublic String getHost()
getHost in class ServiceHealthKeyhost attributepublic Integer getPort()
getPort in class ServiceHealthKeyport attributepublic final ImmutableServiceHealthKey withServiceId(String value)
serviceId attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for serviceIdthis objectpublic final ImmutableServiceHealthKey withHost(String value)
host attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for hostthis objectpublic final ImmutableServiceHealthKey withPort(Integer value)
port attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for portthis objectpublic boolean equals(@Nullable Object another)
ImmutableServiceHealthKey that have equal attribute values.public int hashCode()
serviceId, host, port.public String toString()
ServiceHealthKey with attribute values.public static ImmutableServiceHealthKey copyOf(ServiceHealthKey instance)
ServiceHealthKey value.
Uses accessors to get values to initialize the new immutable instance.
If an instance is already immutable, it is returned as is.instance - The instance to copypublic static ImmutableServiceHealthKey.Builder builder()
ImmutableServiceHealthKey.Copyright © 2018. All rights reserved.