Package io.thestencil.persistence.api
Class ImmutableCreateLocale
- java.lang.Object
-
- io.thestencil.persistence.api.ImmutableCreateLocale
-
- All Implemented Interfaces:
CreateBuilder.CreateLocale
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableCreateLocale extends Object implements CreateBuilder.CreateLocale
Immutable implementation ofCreateBuilder.CreateLocale.Use the builder to create immutable instances:
ImmutableCreateLocale.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableCreateLocale.BuilderBuilds instances of typeImmutableCreateLocale.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableCreateLocale.Builderbuilder()Creates a builder forImmutableCreateLocale.static ImmutableCreateLocalecopyOf(CreateBuilder.CreateLocale instance)Creates an immutable copy of aCreateBuilder.CreateLocalevalue.booleanequals(Object another)This instance is equal to all instances ofImmutableCreateLocalethat have equal attribute values.StringgetLocale()inthashCode()Computes a hash code from attributes:locale.StringtoString()Prints the immutable valueCreateLocalewith attribute values.ImmutableCreateLocalewithLocale(String value)Copy the current immutable object by setting a value for thelocaleattribute.
-
-
-
Method Detail
-
getLocale
public String getLocale()
- Specified by:
getLocalein interfaceCreateBuilder.CreateLocale- Returns:
- The value of the
localeattribute
-
withLocale
public final ImmutableCreateLocale withLocale(String value)
Copy the current immutable object by setting a value for thelocaleattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for locale- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableCreateLocalethat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:locale.
-
toString
public String toString()
Prints the immutable valueCreateLocalewith attribute values.
-
copyOf
public static ImmutableCreateLocale copyOf(CreateBuilder.CreateLocale instance)
Creates an immutable copy of aCreateBuilder.CreateLocalevalue. 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 CreateLocale instance
-
builder
public static ImmutableCreateLocale.Builder builder()
Creates a builder forImmutableCreateLocale.ImmutableCreateLocale.builder() .locale(String) // requiredlocale.build();- Returns:
- A new ImmutableCreateLocale builder
-
-