Package io.thestencil.persistence.api
Class ImmutableLocaleMutator
- java.lang.Object
-
- io.thestencil.persistence.api.ImmutableLocaleMutator
-
- All Implemented Interfaces:
UpdateBuilder.LocaleMutator
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableLocaleMutator extends Object implements UpdateBuilder.LocaleMutator
Immutable implementation ofUpdateBuilder.LocaleMutator.Use the builder to create immutable instances:
ImmutableLocaleMutator.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableLocaleMutator.BuilderBuilds instances of typeImmutableLocaleMutator.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableLocaleMutator.Builderbuilder()Creates a builder forImmutableLocaleMutator.static ImmutableLocaleMutatorcopyOf(UpdateBuilder.LocaleMutator instance)Creates an immutable copy of aUpdateBuilder.LocaleMutatorvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableLocaleMutatorthat have equal attribute values.BooleangetEnabled()StringgetLocaleId()StringgetValue()inthashCode()Computes a hash code from attributes:localeId,value,enabled.StringtoString()Prints the immutable valueLocaleMutatorwith attribute values.ImmutableLocaleMutatorwithEnabled(Boolean value)Copy the current immutable object by setting a value for theenabledattribute.ImmutableLocaleMutatorwithLocaleId(String value)Copy the current immutable object by setting a value for thelocaleIdattribute.ImmutableLocaleMutatorwithValue(String value)Copy the current immutable object by setting a value for thevalueattribute.
-
-
-
Method Detail
-
getLocaleId
public String getLocaleId()
- Specified by:
getLocaleIdin interfaceUpdateBuilder.LocaleMutator- Returns:
- The value of the
localeIdattribute
-
getValue
public String getValue()
- Specified by:
getValuein interfaceUpdateBuilder.LocaleMutator- Returns:
- The value of the
valueattribute
-
getEnabled
public Boolean getEnabled()
- Specified by:
getEnabledin interfaceUpdateBuilder.LocaleMutator- Returns:
- The value of the
enabledattribute
-
withLocaleId
public final ImmutableLocaleMutator withLocaleId(String value)
Copy the current immutable object by setting a value for thelocaleIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for localeId- Returns:
- A modified copy of the
thisobject
-
withValue
public final ImmutableLocaleMutator withValue(String value)
Copy the current immutable object by setting a value for thevalueattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for value- Returns:
- A modified copy of the
thisobject
-
withEnabled
public final ImmutableLocaleMutator withEnabled(Boolean value)
Copy the current immutable object by setting a value for theenabledattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for enabled- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableLocaleMutatorthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:localeId,value,enabled.
-
toString
public String toString()
Prints the immutable valueLocaleMutatorwith attribute values.
-
copyOf
public static ImmutableLocaleMutator copyOf(UpdateBuilder.LocaleMutator instance)
Creates an immutable copy of aUpdateBuilder.LocaleMutatorvalue. 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 LocaleMutator instance
-
builder
public static ImmutableLocaleMutator.Builder builder()
Creates a builder forImmutableLocaleMutator.ImmutableLocaleMutator.builder() .localeId(String) // requiredlocaleId.value(String) // requiredvalue.enabled(Boolean) // requiredenabled.build();- Returns:
- A new ImmutableLocaleMutator builder
-
-