@ParametersAreNonnullByDefault @Generated(value={"Immutables.generator","RaftServer"}) @Immutable public final class ImmutableRaftServer extends RaftServer
RaftServer.
Use the builder to create immutable instances:
ImmutableRaftServer.builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableRaftServer.Builder
Builds instances of type
ImmutableRaftServer. |
| Modifier and Type | Method and Description |
|---|---|
String |
address() |
static ImmutableRaftServer.Builder |
builder()
Creates a builder for
ImmutableRaftServer. |
static ImmutableRaftServer |
copyOf(RaftServer instance)
Creates an immutable copy of a
RaftServer value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableRaftServer that have equal attribute values. |
int |
hashCode()
Computes a hash code from attributes:
id, node, address, leader, voter. |
String |
id() |
Boolean |
leader() |
String |
node() |
String |
toString()
Prints the immutable value
RaftServer with attribute values. |
Boolean |
voter() |
ImmutableRaftServer |
withAddress(String value)
Copy the current immutable object by setting a value for the
address attribute. |
ImmutableRaftServer |
withId(String value)
Copy the current immutable object by setting a value for the
id attribute. |
ImmutableRaftServer |
withLeader(Boolean value)
Copy the current immutable object by setting a value for the
leader attribute. |
ImmutableRaftServer |
withNode(String value)
Copy the current immutable object by setting a value for the
node attribute. |
ImmutableRaftServer |
withVoter(Boolean value)
Copy the current immutable object by setting a value for the
voter attribute. |
public String id()
id in class RaftServerid attributepublic String node()
node in class RaftServernode attributepublic String address()
address in class RaftServeraddress attributepublic Boolean leader()
leader in class RaftServerleader attributepublic Boolean voter()
voter in class RaftServervoter attributepublic final ImmutableRaftServer withId(String value)
id attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for idthis objectpublic final ImmutableRaftServer 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 ImmutableRaftServer 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 ImmutableRaftServer withLeader(Boolean value)
leader attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for leaderthis objectpublic final ImmutableRaftServer withVoter(Boolean value)
voter attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for voterthis objectpublic boolean equals(@Nullable Object another)
ImmutableRaftServer that have equal attribute values.public int hashCode()
id, node, address, leader, voter.public String toString()
RaftServer with attribute values.public static ImmutableRaftServer copyOf(RaftServer instance)
RaftServer 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 ImmutableRaftServer.Builder builder()
ImmutableRaftServer.Copyright © 2018. All rights reserved.