@ParametersAreNonnullByDefault @Generated(value="org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableRaftConfiguration extends RaftConfiguration
RaftConfiguration.
Use the builder to create immutable instances:
ImmutableRaftConfiguration.builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableRaftConfiguration.Builder
Builds instances of type
ImmutableRaftConfiguration. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableRaftConfiguration.Builder |
builder()
Creates a builder for
ImmutableRaftConfiguration. |
static ImmutableRaftConfiguration |
copyOf(RaftConfiguration instance)
Creates an immutable copy of a
RaftConfiguration value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableRaftConfiguration that have equal attribute values. |
int |
hashCode()
Computes a hash code from attributes:
servers, index. |
BigInteger |
index() |
com.google.common.collect.ImmutableList<RaftServer> |
servers() |
String |
toString()
Prints the immutable value
RaftConfiguration with attribute values. |
ImmutableRaftConfiguration |
withIndex(BigInteger value)
Copy the current immutable object by setting a value for the
index attribute. |
ImmutableRaftConfiguration |
withServers(Iterable<? extends RaftServer> elements)
Copy the current immutable object with elements that replace the content of
servers. |
ImmutableRaftConfiguration |
withServers(RaftServer... elements)
Copy the current immutable object with elements that replace the content of
servers. |
public com.google.common.collect.ImmutableList<RaftServer> servers()
servers in class RaftConfigurationservers attributepublic BigInteger index()
index in class RaftConfigurationindex attributepublic final ImmutableRaftConfiguration withServers(RaftServer... elements)
servers.elements - The elements to setthis objectpublic final ImmutableRaftConfiguration withServers(Iterable<? extends RaftServer> elements)
servers.
A shallow reference equality check is used to prevent copying of the same value by returning this.elements - An iterable of servers elements to setthis objectpublic final ImmutableRaftConfiguration withIndex(BigInteger value)
index attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for indexthis objectpublic boolean equals(@Nullable Object another)
ImmutableRaftConfiguration that have equal attribute values.public int hashCode()
servers, index.public String toString()
RaftConfiguration with attribute values.public static ImmutableRaftConfiguration copyOf(RaftConfiguration instance)
RaftConfiguration 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 ImmutableRaftConfiguration.Builder builder()
ImmutableRaftConfiguration.
ImmutableRaftConfiguration.builder()
.addServers|addAllServers(com.orbitz.consul.model.operator.RaftServer) // servers elements
.index(java.math.BigInteger) // required index
.build();
Copyright © 2019. All rights reserved.