@ParametersAreNonnullByDefault @Generated(value="org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableCatalogNode extends CatalogNode
CatalogNode.
Use the builder to create immutable instances:
ImmutableCatalogNode.builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableCatalogNode.Builder
Builds instances of type
ImmutableCatalogNode. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableCatalogNode.Builder |
builder()
Creates a builder for
ImmutableCatalogNode. |
static ImmutableCatalogNode |
copyOf(CatalogNode instance)
Creates an immutable copy of a
CatalogNode value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableCatalogNode that have equal attribute values. |
Node |
getNode() |
com.google.common.collect.ImmutableMap<String,Service> |
getServices() |
int |
hashCode()
Computes a hash code from attributes:
node, services. |
String |
toString()
Prints the immutable value
CatalogNode with attribute values. |
ImmutableCatalogNode |
withNode(Node value)
Copy the current immutable object by setting a value for the
node attribute. |
ImmutableCatalogNode |
withServices(Map<String,? extends Service> entries)
Copy the current immutable object by replacing the
services map with the specified map. |
public Node getNode()
getNode in class CatalogNodenode attributepublic com.google.common.collect.ImmutableMap<String,Service> getServices()
getServices in class CatalogNodeservices attributepublic final ImmutableCatalogNode withNode(Node value)
node attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for nodethis objectpublic final ImmutableCatalogNode withServices(Map<String,? extends Service> entries)
services map with the specified map.
Nulls are not permitted as keys or values.
A shallow reference equality check is used to prevent copying of the same value by returning this.entries - The entries to be added to the services mapthis objectpublic boolean equals(@Nullable Object another)
ImmutableCatalogNode that have equal attribute values.public int hashCode()
node, services.public String toString()
CatalogNode with attribute values.public static ImmutableCatalogNode copyOf(CatalogNode instance)
CatalogNode 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 ImmutableCatalogNode.Builder builder()
ImmutableCatalogNode.
ImmutableCatalogNode.builder()
.node(com.orbitz.consul.model.health.Node) // required node
.putServices|putAllServices(String => com.orbitz.consul.model.health.Service) // services mappings
.build();
Copyright © 2019. All rights reserved.