Class ImmutableMongoDbConfig
- java.lang.Object
-
- io.resys.hdes.object.repo.mongodb.ImmutableMongoDbConfig
-
- All Implemented Interfaces:
MongoCommand.MongoDbConfig
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableMongoDbConfig extends Object implements MongoCommand.MongoDbConfig
Immutable implementation ofMongoCommand.MongoDbConfig.Use the builder to create immutable instances:
ImmutableMongoDbConfig.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableMongoDbConfig.BuilderBuilds instances of typeImmutableMongoDbConfig.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableMongoDbConfig.Builderbuilder()Creates a builder forImmutableMongoDbConfig.static ImmutableMongoDbConfigcopyOf(MongoCommand.MongoDbConfig instance)Creates an immutable copy of aMongoCommand.MongoDbConfigvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableMongoDbConfigthat have equal attribute values.StringgetDb()StringgetObjects()StringgetRefs()StringgetTags()inthashCode()Computes a hash code from attributes:db,refs,tags,objects.StringtoString()Prints the immutable valueMongoDbConfigwith attribute values.ImmutableMongoDbConfigwithDb(String value)Copy the current immutable object by setting a value for thedbattribute.ImmutableMongoDbConfigwithObjects(String value)Copy the current immutable object by setting a value for theobjectsattribute.ImmutableMongoDbConfigwithRefs(String value)Copy the current immutable object by setting a value for therefsattribute.ImmutableMongoDbConfigwithTags(String value)Copy the current immutable object by setting a value for thetagsattribute.
-
-
-
Method Detail
-
getDb
public String getDb()
- Specified by:
getDbin interfaceMongoCommand.MongoDbConfig- Returns:
- The value of the
dbattribute
-
getRefs
public String getRefs()
- Specified by:
getRefsin interfaceMongoCommand.MongoDbConfig- Returns:
- The value of the
refsattribute
-
getTags
public String getTags()
- Specified by:
getTagsin interfaceMongoCommand.MongoDbConfig- Returns:
- The value of the
tagsattribute
-
getObjects
public String getObjects()
- Specified by:
getObjectsin interfaceMongoCommand.MongoDbConfig- Returns:
- The value of the
objectsattribute
-
withDb
public final ImmutableMongoDbConfig withDb(String value)
Copy the current immutable object by setting a value for thedbattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for db- Returns:
- A modified copy of the
thisobject
-
withRefs
public final ImmutableMongoDbConfig withRefs(String value)
Copy the current immutable object by setting a value for therefsattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for refs- Returns:
- A modified copy of the
thisobject
-
withTags
public final ImmutableMongoDbConfig withTags(String value)
Copy the current immutable object by setting a value for thetagsattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for tags- Returns:
- A modified copy of the
thisobject
-
withObjects
public final ImmutableMongoDbConfig withObjects(String value)
Copy the current immutable object by setting a value for theobjectsattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for objects- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableMongoDbConfigthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:db,refs,tags,objects.
-
toString
public String toString()
Prints the immutable valueMongoDbConfigwith attribute values.
-
copyOf
public static ImmutableMongoDbConfig copyOf(MongoCommand.MongoDbConfig instance)
Creates an immutable copy of aMongoCommand.MongoDbConfigvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable MongoDbConfig instance
-
builder
public static ImmutableMongoDbConfig.Builder builder()
Creates a builder forImmutableMongoDbConfig.ImmutableMongoDbConfig.builder() .db(String) // requireddb.refs(String) // requiredrefs.tags(String) // requiredtags.objects(String) // requiredobjects.build();- Returns:
- A new ImmutableMongoDbConfig builder
-
-