@ParametersAreNonnullByDefault @Generated(value="org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableNode extends Node
Node.
Use the builder to create immutable instances:
ImmutableNode.builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableNode.Builder
Builds instances of type
ImmutableNode. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableNode.Builder |
builder()
Creates a builder for
ImmutableNode. |
static ImmutableNode |
copyOf(Node instance)
Creates an immutable copy of a
Node value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableNode that have equal attribute values. |
String |
getAddress() |
Optional<String> |
getDatacenter() |
String |
getNode() |
Optional<Map<String,String>> |
getNodeMeta() |
Optional<TaggedAddresses> |
getTaggedAddresses() |
int |
hashCode()
Computes a hash code from attributes:
node, address, datacenter, taggedAddresses, nodeMeta. |
String |
toString()
Prints the immutable value
Node with attribute values. |
ImmutableNode |
withAddress(String value)
Copy the current immutable object by setting a value for the
address attribute. |
ImmutableNode |
withDatacenter(Optional<String> optional)
Copy the current immutable object by setting an optional value for the
datacenter attribute. |
ImmutableNode |
withDatacenter(String value)
Copy the current immutable object by setting a present value for the optional
datacenter attribute. |
ImmutableNode |
withNode(String value)
Copy the current immutable object by setting a value for the
node attribute. |
ImmutableNode |
withNodeMeta(Map<String,String> value)
Copy the current immutable object by setting a present value for the optional
nodeMeta attribute. |
ImmutableNode |
withNodeMeta(Optional<? extends Map<String,String>> optional)
Copy the current immutable object by setting an optional value for the
nodeMeta attribute. |
ImmutableNode |
withTaggedAddresses(Optional<? extends TaggedAddresses> optional)
Copy the current immutable object by setting an optional value for the
taggedAddresses attribute. |
ImmutableNode |
withTaggedAddresses(TaggedAddresses value)
Copy the current immutable object by setting a present value for the optional
taggedAddresses attribute. |
public String getNode()
public String getAddress()
getAddress in class Nodeaddress attributepublic Optional<String> getDatacenter()
getDatacenter in class Nodedatacenter attributepublic Optional<TaggedAddresses> getTaggedAddresses()
getTaggedAddresses in class NodetaggedAddresses attributepublic Optional<Map<String,String>> getNodeMeta()
getNodeMeta in class NodenodeMeta attributepublic final ImmutableNode withNode(String value)
node attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for nodethis objectpublic final ImmutableNode withAddress(String value)
address attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for addressthis objectpublic final ImmutableNode withDatacenter(String value)
datacenter attribute.value - The value for datacenterthis objectpublic final ImmutableNode withDatacenter(Optional<String> optional)
datacenter attribute.
An equality check is used on inner nullable value to prevent copying of the same value by returning this.optional - A value for datacenterthis objectpublic final ImmutableNode withTaggedAddresses(TaggedAddresses value)
taggedAddresses attribute.value - The value for taggedAddressesthis objectpublic final ImmutableNode withTaggedAddresses(Optional<? extends TaggedAddresses> optional)
taggedAddresses attribute.
A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.optional - A value for taggedAddressesthis objectpublic final ImmutableNode withNodeMeta(Map<String,String> value)
nodeMeta attribute.value - The value for nodeMetathis objectpublic final ImmutableNode withNodeMeta(Optional<? extends Map<String,String>> optional)
nodeMeta attribute.
A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.optional - A value for nodeMetathis objectpublic boolean equals(@Nullable Object another)
ImmutableNode that have equal attribute values.public int hashCode()
node, address, datacenter, taggedAddresses, nodeMeta.public String toString()
Node with attribute values.public static ImmutableNode copyOf(Node instance)
Node 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 ImmutableNode.Builder builder()
ImmutableNode.
ImmutableNode.builder()
.node(String) // required node
.address(String) // required address
.datacenter(String) // optional datacenter
.taggedAddresses(com.orbitz.consul.model.catalog.TaggedAddresses) // optional taggedAddresses
.nodeMeta(Map<String, String>) // optional nodeMeta
.build();
Copyright © 2019. All rights reserved.