Package io.thestencil.client.api
Class ImmutableLocale
- java.lang.Object
-
- io.thestencil.client.api.ImmutableLocale
-
- All Implemented Interfaces:
StencilClient.EntityBody,StencilClient.Locale,Serializable
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableLocale extends Object implements StencilClient.Locale
Immutable implementation ofStencilClient.Locale.Use the builder to create immutable instances:
ImmutableLocale.builder().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableLocale.BuilderBuilds instances of typeImmutableLocale.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableLocale.Builderbuilder()Creates a builder forImmutableLocale.static ImmutableLocalecopyOf(StencilClient.Locale instance)Creates an immutable copy of aStencilClient.Localevalue.booleanequals(Object another)This instance is equal to all instances ofImmutableLocalethat have equal attribute values.BooleangetEnabled()StringgetValue()inthashCode()Computes a hash code from attributes:value,enabled.StringtoString()Prints the immutable valueLocalewith attribute values.ImmutableLocalewithEnabled(Boolean value)Copy the current immutable object by setting a value for theenabledattribute.ImmutableLocalewithValue(String value)Copy the current immutable object by setting a value for thevalueattribute.
-
-
-
Method Detail
-
getValue
public String getValue()
- Specified by:
getValuein interfaceStencilClient.Locale- Returns:
- The value of the
valueattribute
-
getEnabled
public Boolean getEnabled()
- Specified by:
getEnabledin interfaceStencilClient.Locale- Returns:
- The value of the
enabledattribute
-
withValue
public final ImmutableLocale 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 ImmutableLocale 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 ofImmutableLocalethat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:value,enabled.
-
toString
public String toString()
Prints the immutable valueLocalewith attribute values.
-
copyOf
public static ImmutableLocale copyOf(StencilClient.Locale instance)
Creates an immutable copy of aStencilClient.Localevalue. 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 Locale instance
-
builder
public static ImmutableLocale.Builder builder()
Creates a builder forImmutableLocale.ImmutableLocale.builder() .value(String) // requiredvalue.enabled(Boolean) // requiredenabled.build();- Returns:
- A new ImmutableLocale builder
-
-