@ParametersAreNonnullByDefault @Generated(value="org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableFailover extends Failover
Failover.
Use the builder to create immutable instances:
ImmutableFailover.builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableFailover.Builder
Builds instances of type
ImmutableFailover. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableFailover.Builder |
builder()
Creates a builder for
ImmutableFailover. |
static ImmutableFailover |
copyOf(Failover instance)
Creates an immutable copy of a
Failover value. |
Optional<List<String>> |
datacenters() |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableFailover that have equal attribute values. |
Optional<Integer> |
getNearestN() |
int |
hashCode()
Computes a hash code from attributes:
nearestN, datacenters. |
String |
toString()
Prints the immutable value
Failover with attribute values. |
ImmutableFailover |
withDatacenters(List<String> value)
Copy the current immutable object by setting a present value for the optional
datacenters attribute. |
ImmutableFailover |
withDatacenters(Optional<? extends List<String>> optional)
Copy the current immutable object by setting an optional value for the
datacenters attribute. |
ImmutableFailover |
withNearestN(int value)
Copy the current immutable object by setting a present value for the optional
nearestN attribute. |
ImmutableFailover |
withNearestN(Optional<Integer> optional)
Copy the current immutable object by setting an optional value for the
nearestN attribute. |
public Optional<Integer> getNearestN()
getNearestN in class FailovernearestN attributepublic Optional<List<String>> datacenters()
datacenters in class Failoverdatacenters attributepublic final ImmutableFailover withNearestN(int value)
nearestN attribute.value - The value for nearestNthis objectpublic final ImmutableFailover withNearestN(Optional<Integer> optional)
nearestN attribute.
An equality check is used on inner nullable value to prevent copying of the same value by returning this.optional - A value for nearestNthis objectpublic final ImmutableFailover withDatacenters(List<String> value)
datacenters attribute.value - The value for datacentersthis objectpublic final ImmutableFailover withDatacenters(Optional<? extends List<String>> optional)
datacenters 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 datacentersthis objectpublic boolean equals(@Nullable Object another)
ImmutableFailover that have equal attribute values.public int hashCode()
nearestN, datacenters.public String toString()
Failover with attribute values.public static ImmutableFailover copyOf(Failover instance)
Failover 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 ImmutableFailover.Builder builder()
ImmutableFailover.
ImmutableFailover.builder()
.nearestN(Integer) // optional nearestN
.datacenters(List<String>) // optional datacenters
.build();
Copyright © 2019. All rights reserved.