Package io.thestencil.client.api
Class ImmutableLocaleLabel
- java.lang.Object
-
- io.thestencil.client.api.ImmutableLocaleLabel
-
- All Implemented Interfaces:
StencilClient.LocaleLabel,Serializable
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableLocaleLabel extends Object implements StencilClient.LocaleLabel
Immutable implementation ofStencilClient.LocaleLabel.Use the builder to create immutable instances:
ImmutableLocaleLabel.builder().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableLocaleLabel.BuilderBuilds instances of typeImmutableLocaleLabel.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableLocaleLabel.Builderbuilder()Creates a builder forImmutableLocaleLabel.static ImmutableLocaleLabelcopyOf(StencilClient.LocaleLabel instance)Creates an immutable copy of aStencilClient.LocaleLabelvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableLocaleLabelthat have equal attribute values.StringgetLabelValue()StringgetLocale()inthashCode()Computes a hash code from attributes:locale,labelValue.StringtoString()Prints the immutable valueLocaleLabelwith attribute values.ImmutableLocaleLabelwithLabelValue(String value)Copy the current immutable object by setting a value for thelabelValueattribute.ImmutableLocaleLabelwithLocale(String value)Copy the current immutable object by setting a value for thelocaleattribute.
-
-
-
Method Detail
-
getLocale
public String getLocale()
- Specified by:
getLocalein interfaceStencilClient.LocaleLabel- Returns:
- The value of the
localeattribute
-
getLabelValue
public String getLabelValue()
- Specified by:
getLabelValuein interfaceStencilClient.LocaleLabel- Returns:
- The value of the
labelValueattribute
-
withLocale
public final ImmutableLocaleLabel 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
-
withLabelValue
public final ImmutableLocaleLabel withLabelValue(String value)
Copy the current immutable object by setting a value for thelabelValueattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for labelValue- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableLocaleLabelthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:locale,labelValue.
-
toString
public String toString()
Prints the immutable valueLocaleLabelwith attribute values.
-
copyOf
public static ImmutableLocaleLabel copyOf(StencilClient.LocaleLabel instance)
Creates an immutable copy of aStencilClient.LocaleLabelvalue. 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 LocaleLabel instance
-
builder
public static ImmutableLocaleLabel.Builder builder()
Creates a builder forImmutableLocaleLabel.ImmutableLocaleLabel.builder() .locale(String) // requiredlocale.labelValue(String) // requiredlabelValue.build();- Returns:
- A new ImmutableLocaleLabel builder
-
-