Class ImmutableSetLocale
java.lang.Object
io.dialob.session.engine.session.command.ImmutableSetLocale
- All Implemented Interfaces:
AbstractUpdateCommand<ItemId,,ItemState> Command<ItemState>,ItemUpdateCommand,SetLocale,UpdateCommand<ItemId,,ItemState> Serializable
@Generated(from="SetLocale",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableSetLocale
extends Object
implements SetLocale
Immutable implementation of
SetLocale.
Use the builder to create immutable instances:
ImmutableSetLocale.builder().
Use the static factory method to create immutable instances:
ImmutableSetLocale.of().
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableSetLocale.Builderbuilder()Creates a builder forImmutableSetLocale.static ImmutableSetLocaleCreates an immutable copy of aSetLocalevalue.booleanThis instance is equal to all instances ofImmutableSetLocalethat have equal attribute values.inthashCode()Computes a hash code from attributes:triggers,targetId,locale.static ImmutableSetLocaleConstruct a new immutableSetLocaleinstance.static ImmutableSetLocaleConstruct a new immutableSetLocaleinstance.toString()Prints the immutable valueSetLocalewith attribute values.final ImmutableSetLocalewithLocale(String value) Copy the current immutable object by setting a value for thelocaleattribute.final ImmutableSetLocalewithTargetId(ItemId value) Copy the current immutable object by setting a value for thetargetIdattribute.final ImmutableSetLocalewithTriggers(Trigger<ItemState>... elements) Copy the current immutable object with elements that replace the content oftriggers.final 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, waitMethods inherited from interface io.dialob.session.engine.session.command.Command
getEventMatchers
-
Method Details
-
getTriggers
- Specified by:
getTriggersin interfaceCommand<ItemState>- Returns:
- The value of the
triggersattribute
-
getTargetId
- Specified by:
getTargetIdin interfaceSetLocale- Specified by:
getTargetIdin interfaceUpdateCommand<ItemId,ItemState> - Returns:
- The value of the
targetIdattribute
-
getLocale
-
withTriggers
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
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 or
thisif not changed
-
withTargetId
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 or the
thisobject
-
withLocale
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 or the
thisobject
-
equals
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
Prints the immutable valueSetLocalewith attribute values. -
of
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
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
Creates a builder forImmutableSetLocale.ImmutableSetLocale.builder() .addTriggers|addAllTriggers(io.dialob.session.engine.session.command.Trigger<io.dialob.session.engine.session.model.ItemState>) //triggerselements .targetId(io.dialob.session.engine.session.model.ItemId) // optionaltargetId.locale(String | null) // nullablelocale.build();- Returns:
- A new ImmutableSetLocale builder
-