public final class ImmutableMongosArguments extends MongosArguments
MongosArguments.
Use the builder to create immutable instances:
ImmutableMongosArguments.builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableMongosArguments.Builder
Builds instances of type
ImmutableMongosArguments. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableMongosArguments.Builder |
builder()
Creates a builder for
ImmutableMongosArguments. |
Optional<String> |
configDB() |
static ImmutableMongosArguments |
copyOf(MongosArguments instance)
Creates an immutable copy of a
MongosArguments value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableMongosArguments that have equal attribute values. |
int |
hashCode()
Computes a hash code from attributes:
verbose, configDB, replicaSet. |
Optional<String> |
replicaSet() |
String |
toString()
Prints the immutable value
MongosArguments with attribute values. |
boolean |
verbose() |
ImmutableMongosArguments |
withConfigDB(Optional<String> optional)
Copy the current immutable object by setting an optional value for the
configDB attribute. |
ImmutableMongosArguments |
withConfigDB(String value)
Copy the current immutable object by setting a present value for the optional
configDB attribute. |
ImmutableMongosArguments |
withReplicaSet(Optional<String> optional)
Copy the current immutable object by setting an optional value for the
replicaSet attribute. |
ImmutableMongosArguments |
withReplicaSet(String value)
Copy the current immutable object by setting a present value for the optional
replicaSet attribute. |
ImmutableMongosArguments |
withVerbose(boolean value)
Copy the current immutable object by setting a value for the
verbose attribute. |
asArguments, defaultspublic boolean verbose()
verbose in class MongosArgumentsverbose attributepublic Optional<String> configDB()
configDB in class MongosArgumentsconfigDB attributepublic Optional<String> replicaSet()
replicaSet in class MongosArgumentsreplicaSet attributepublic final ImmutableMongosArguments withVerbose(boolean value)
verbose attribute.
A value equality check is used to prevent copying of the same value by returning this.value - A new value for verbosethis objectpublic final ImmutableMongosArguments withConfigDB(String value)
configDB attribute.value - The value for configDBthis objectpublic final ImmutableMongosArguments withConfigDB(Optional<String> optional)
configDB attribute.
An equality check is used on inner nullable value to prevent copying of the same value by returning this.optional - A value for configDBthis objectpublic final ImmutableMongosArguments withReplicaSet(String value)
replicaSet attribute.value - The value for replicaSetthis objectpublic final ImmutableMongosArguments withReplicaSet(Optional<String> optional)
replicaSet attribute.
An equality check is used on inner nullable value to prevent copying of the same value by returning this.optional - A value for replicaSetthis objectpublic boolean equals(Object another)
ImmutableMongosArguments that have equal attribute values.public int hashCode()
verbose, configDB, replicaSet.public String toString()
MongosArguments with attribute values.public static ImmutableMongosArguments copyOf(MongosArguments instance)
MongosArguments 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 ImmutableMongosArguments.Builder builder()
ImmutableMongosArguments.
ImmutableMongosArguments.builder()
.verbose(boolean) // optional verbose
.configDB(String) // optional configDB
.replicaSet(String) // optional replicaSet
.build();
Copyright © 2023. All rights reserved.