Package io.dialob.executor.command
Class ImmutableSetLocale
- java.lang.Object
-
- io.dialob.executor.command.ImmutableSetLocale
-
- All Implemented Interfaces:
AbstractUpdateCommand<ItemId,ItemState>,Command<ItemState>,ItemUpdateCommand,SetLocale,UpdateCommand<ItemId,ItemState>,Serializable
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableSetLocale extends Object implements SetLocale
Immutable implementation ofSetLocale.Use the builder to create immutable instances:
ImmutableSetLocale.builder(). Use the static factory method to create immutable instances:ImmutableSetLocale.of().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableSetLocale.BuilderBuilds instances of typeImmutableSetLocale.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableSetLocale.Builderbuilder()Creates a builder forImmutableSetLocale.static ImmutableSetLocalecopyOf(SetLocale instance)Creates an immutable copy of aSetLocalevalue.booleanequals(Object another)This instance is equal to all instances ofImmutableSetLocalethat have equal attribute values.StringgetLocale()ItemIdgetTargetId()com.google.common.collect.ImmutableList<Trigger<ItemState>>getTriggers()inthashCode()Computes a hash code from attributes:triggers,targetId,locale.static ImmutableSetLocaleof(String locale, Iterable<? extends Trigger<ItemState>> triggers)Construct a new immutableSetLocaleinstance.static ImmutableSetLocaleof(String locale, List<Trigger<ItemState>> triggers)Construct a new immutableSetLocaleinstance.StringtoString()Prints the immutable valueSetLocalewith attribute values.ImmutableSetLocalewithLocale(String value)Copy the current immutable object by setting a value for thelocaleattribute.ImmutableSetLocalewithTargetId(ItemId value)Copy the current immutable object by setting a value for thetargetIdattribute.ImmutableSetLocalewithTriggers(Trigger<ItemState>... elements)Copy the current immutable object with elements that replace the content oftriggers.ImmutableSetLocalewithTriggers(Iterable<? extends Trigger<ItemState>> elements)Copy the current immutable object with elements that replace the content oftriggers.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.dialob.executor.command.Command
getEventMatchers
-
-
-
-
Method Detail
-
getTriggers
public com.google.common.collect.ImmutableList<Trigger<ItemState>> getTriggers()
- Specified by:
getTriggersin interfaceCommand<ItemState>- Returns:
- The value of the
triggersattribute
-
getTargetId
public ItemId getTargetId()
- Specified by:
getTargetIdin interfaceSetLocale- Specified by:
getTargetIdin interfaceUpdateCommand<ItemId,ItemState>- Returns:
- The value of the
targetIdattribute
-
getLocale
@Nullable public String getLocale()
-
withTriggers
@SafeVarargs public final ImmutableSetLocale withTriggers(Trigger<ItemState>... elements)
Copy the current immutable object with elements that replace the content oftriggers.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withTriggers
public final ImmutableSetLocale withTriggers(Iterable<? extends Trigger<ItemState>> elements)
Copy the current immutable object with elements that replace the content oftriggers. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of triggers elements to set- Returns:
- A modified copy of
thisobject
-
withTargetId
public final ImmutableSetLocale withTargetId(ItemId value)
Copy the current immutable object by setting a value for thetargetIdattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Specified by:
withTargetIdin interfaceUpdateCommand<ItemId,ItemState>- Parameters:
value- A new value for targetId- Returns:
- A modified copy of the
thisobject
-
withLocale
public final ImmutableSetLocale withLocale(@Nullable 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 (can benull)- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableSetLocalethat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:triggers,targetId,locale.
-
toString
public String toString()
Prints the immutable valueSetLocalewith attribute values.
-
of
public static ImmutableSetLocale of(@Nullable String locale, List<Trigger<ItemState>> triggers)
Construct a new immutableSetLocaleinstance.- Parameters:
locale- The value for thelocaleattributetriggers- The value for thetriggersattribute- Returns:
- An immutable SetLocale instance
-
of
public static ImmutableSetLocale of(@Nullable String locale, Iterable<? extends Trigger<ItemState>> triggers)
Construct a new immutableSetLocaleinstance.- Parameters:
locale- The value for thelocaleattributetriggers- The value for thetriggersattribute- Returns:
- An immutable SetLocale instance
-
copyOf
public static ImmutableSetLocale copyOf(SetLocale instance)
Creates an immutable copy of aSetLocalevalue. 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 SetLocale instance
-
builder
public static ImmutableSetLocale.Builder builder()
Creates a builder forImmutableSetLocale.ImmutableSetLocale.builder() .addTriggers|addAllTriggers(io.dialob.executor.command.Trigger<io.dialob.executor.model.ItemState>) //triggerselements .targetId(io.dialob.executor.model.ItemId) // optionaltargetId.locale(String | null) // nullablelocale.build();- Returns:
- A new ImmutableSetLocale builder
-
-