public final class ImmutableMongoShellArguments extends MongoShellArguments
MongoShellArguments.
Use the builder to create immutable instances:
ImmutableMongoShellArguments.builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableMongoShellArguments.Builder
Builds instances of type
ImmutableMongoShellArguments. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableMongoShellArguments.Builder |
builder()
Creates a builder for
ImmutableMongoShellArguments. |
static ImmutableMongoShellArguments |
copyOf(MongoShellArguments instance)
Creates an immutable copy of a
MongoShellArguments value. |
Optional<String> |
dbName() |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableMongoShellArguments that have equal attribute values. |
int |
hashCode()
Computes a hash code from attributes:
scriptParameters, scriptName, dbName, password, userName. |
Optional<String> |
password() |
Optional<String> |
scriptName() |
List<String> |
scriptParameters() |
String |
toString()
Prints the immutable value
MongoShellArguments with attribute values. |
Optional<String> |
userName() |
ImmutableMongoShellArguments |
withDbName(Optional<String> optional)
Copy the current immutable object by setting an optional value for the
dbName attribute. |
ImmutableMongoShellArguments |
withDbName(String value)
Copy the current immutable object by setting a present value for the optional
dbName attribute. |
ImmutableMongoShellArguments |
withPassword(Optional<String> optional)
Copy the current immutable object by setting an optional value for the
password attribute. |
ImmutableMongoShellArguments |
withPassword(String value)
Copy the current immutable object by setting a present value for the optional
password attribute. |
ImmutableMongoShellArguments |
withScriptName(Optional<String> optional)
Copy the current immutable object by setting an optional value for the
scriptName attribute. |
ImmutableMongoShellArguments |
withScriptName(String value)
Copy the current immutable object by setting a present value for the optional
scriptName attribute. |
ImmutableMongoShellArguments |
withScriptParameters(Iterable<String> elements)
Copy the current immutable object with elements that replace the content of
scriptParameters. |
ImmutableMongoShellArguments |
withScriptParameters(String... elements)
Copy the current immutable object with elements that replace the content of
scriptParameters. |
ImmutableMongoShellArguments |
withUserName(Optional<String> optional)
Copy the current immutable object by setting an optional value for the
userName attribute. |
ImmutableMongoShellArguments |
withUserName(String value)
Copy the current immutable object by setting a present value for the optional
userName attribute. |
asArguments, defaultspublic List<String> scriptParameters()
scriptParameters in class MongoShellArgumentsscriptParameters attributepublic Optional<String> scriptName()
scriptName in class MongoShellArgumentsscriptName attributepublic Optional<String> dbName()
dbName in class MongoShellArgumentsdbName attributepublic Optional<String> password()
password in class MongoShellArgumentspassword attributepublic Optional<String> userName()
userName in class MongoShellArgumentsuserName attributepublic final ImmutableMongoShellArguments withScriptParameters(String... elements)
scriptParameters.elements - The elements to setthis objectpublic final ImmutableMongoShellArguments withScriptParameters(Iterable<String> elements)
scriptParameters.
A shallow reference equality check is used to prevent copying of the same value by returning this.elements - An iterable of scriptParameters elements to setthis objectpublic final ImmutableMongoShellArguments withScriptName(String value)
scriptName attribute.value - The value for scriptNamethis objectpublic final ImmutableMongoShellArguments withScriptName(Optional<String> optional)
scriptName attribute.
An equality check is used on inner nullable value to prevent copying of the same value by returning this.optional - A value for scriptNamethis objectpublic final ImmutableMongoShellArguments withDbName(String value)
dbName attribute.value - The value for dbNamethis objectpublic final ImmutableMongoShellArguments withDbName(Optional<String> optional)
dbName attribute.
An equality check is used on inner nullable value to prevent copying of the same value by returning this.optional - A value for dbNamethis objectpublic final ImmutableMongoShellArguments withPassword(String value)
password attribute.value - The value for passwordthis objectpublic final ImmutableMongoShellArguments withPassword(Optional<String> optional)
password attribute.
An equality check is used on inner nullable value to prevent copying of the same value by returning this.optional - A value for passwordthis objectpublic final ImmutableMongoShellArguments withUserName(String value)
userName attribute.value - The value for userNamethis objectpublic final ImmutableMongoShellArguments withUserName(Optional<String> optional)
userName attribute.
An equality check is used on inner nullable value to prevent copying of the same value by returning this.optional - A value for userNamethis objectpublic boolean equals(Object another)
ImmutableMongoShellArguments that have equal attribute values.public int hashCode()
scriptParameters, scriptName, dbName, password, userName.public String toString()
MongoShellArguments with attribute values.public static ImmutableMongoShellArguments copyOf(MongoShellArguments instance)
MongoShellArguments 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 ImmutableMongoShellArguments.Builder builder()
ImmutableMongoShellArguments.
ImmutableMongoShellArguments.builder()
.addScriptParameters|addAllScriptParameters(String) // scriptParameters elements
.scriptName(String) // optional scriptName
.dbName(String) // optional dbName
.password(String) // optional password
.userName(String) // optional userName
.build();
Copyright © 2023. All rights reserved.