@ParametersAreNonnullByDefault @Generated(value={"Immutables.generator","Config"}) @Immutable public final class ImmutableConfig extends Config
Config.
Use the builder to create immutable instances:
ImmutableConfig.builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableConfig.Builder
Builds instances of type
ImmutableConfig. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableConfig.Builder |
builder()
Creates a builder for
ImmutableConfig. |
static ImmutableConfig |
copyOf(Config instance)
Creates an immutable copy of a
Config value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableConfig that have equal attribute values. |
String |
getDatacenter() |
String |
getNodeName() |
String |
getRevision() |
boolean |
getServer() |
String |
getVersion() |
int |
hashCode()
Computes a hash code from attributes:
datacenter, nodeName, revision, server, version. |
String |
toString()
Prints the immutable value
Config with attribute values. |
ImmutableConfig |
withDatacenter(String value)
Copy the current immutable object by setting a value for the
datacenter attribute. |
ImmutableConfig |
withNodeName(String value)
Copy the current immutable object by setting a value for the
nodeName attribute. |
ImmutableConfig |
withRevision(String value)
Copy the current immutable object by setting a value for the
revision attribute. |
ImmutableConfig |
withServer(boolean value)
Copy the current immutable object by setting a value for the
server attribute. |
ImmutableConfig |
withVersion(String value)
Copy the current immutable object by setting a value for the
version attribute. |
public String getDatacenter()
getDatacenter in class Configdatacenter attributepublic String getNodeName()
getNodeName in class ConfignodeName attributepublic String getRevision()
getRevision in class Configrevision attributepublic boolean getServer()
public String getVersion()
getVersion in class Configversion attributepublic final ImmutableConfig withDatacenter(String value)
datacenter attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for datacenterthis objectpublic final ImmutableConfig withNodeName(String value)
nodeName attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for nodeNamethis objectpublic final ImmutableConfig withRevision(String value)
revision attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for revisionthis objectpublic final ImmutableConfig withServer(boolean value)
server attribute.
A value equality check is used to prevent copying of the same value by returning this.value - A new value for serverthis objectpublic final ImmutableConfig withVersion(String value)
version attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for versionthis objectpublic boolean equals(@Nullable Object another)
ImmutableConfig that have equal attribute values.public int hashCode()
datacenter, nodeName, revision, server, version.public String toString()
Config with attribute values.public static ImmutableConfig copyOf(Config instance)
Config 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 ImmutableConfig.Builder builder()
ImmutableConfig.Copyright © 2018. All rights reserved.