Package io.dialob.executor.command.event
Class ImmutableItemAddedEvent
- java.lang.Object
-
- io.dialob.executor.command.event.ImmutableItemAddedEvent
-
- All Implemented Interfaces:
Event,ItemAddedEvent,Serializable
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableItemAddedEvent extends Object implements ItemAddedEvent
Immutable implementation ofItemAddedEvent.Use the builder to create immutable instances:
ImmutableItemAddedEvent.builder(). Use the static factory method to create immutable instances:ImmutableItemAddedEvent.of().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableItemAddedEvent.BuilderBuilds instances of typeImmutableItemAddedEvent.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableItemAddedEvent.Builderbuilder()Creates a builder forImmutableItemAddedEvent.static ImmutableItemAddedEventcopyOf(ItemAddedEvent instance)Creates an immutable copy of aItemAddedEventvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableItemAddedEventthat have equal attribute values.ItemIdgetAddItemId()ItemIdgetPrototypeId()inthashCode()Computes a hash code from attributes:addItemId,prototypeId.static ImmutableItemAddedEventof(ItemId addItemId, ItemId prototypeId)Construct a new immutableItemAddedEventinstance.StringtoString()Prints the immutable valueItemAddedEventwith attribute values.ImmutableItemAddedEventwithAddItemId(ItemId value)Copy the current immutable object by setting a value for theaddItemIdattribute.ImmutableItemAddedEventwithPrototypeId(ItemId value)Copy the current immutable object by setting a value for theprototypeIdattribute.
-
-
-
Method Detail
-
getAddItemId
public ItemId getAddItemId()
- Specified by:
getAddItemIdin interfaceItemAddedEvent- Returns:
- The value of the
addItemIdattribute
-
getPrototypeId
public ItemId getPrototypeId()
- Specified by:
getPrototypeIdin interfaceItemAddedEvent- Returns:
- The value of the
prototypeIdattribute
-
withAddItemId
public final ImmutableItemAddedEvent withAddItemId(ItemId value)
Copy the current immutable object by setting a value for theaddItemIdattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for addItemId- Returns:
- A modified copy of the
thisobject
-
withPrototypeId
public final ImmutableItemAddedEvent withPrototypeId(ItemId value)
Copy the current immutable object by setting a value for theprototypeIdattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for prototypeId- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableItemAddedEventthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:addItemId,prototypeId.
-
toString
public String toString()
Prints the immutable valueItemAddedEventwith attribute values.
-
of
public static ImmutableItemAddedEvent of(ItemId addItemId, ItemId prototypeId)
Construct a new immutableItemAddedEventinstance.- Parameters:
addItemId- The value for theaddItemIdattributeprototypeId- The value for theprototypeIdattribute- Returns:
- An immutable ItemAddedEvent instance
-
copyOf
public static ImmutableItemAddedEvent copyOf(ItemAddedEvent instance)
Creates an immutable copy of aItemAddedEventvalue. 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 ItemAddedEvent instance
-
builder
public static ImmutableItemAddedEvent.Builder builder()
Creates a builder forImmutableItemAddedEvent.ImmutableItemAddedEvent.builder() .addItemId(io.dialob.executor.model.ItemId) // requiredaddItemId.prototypeId(io.dialob.executor.model.ItemId) // requiredprototypeId.build();- Returns:
- A new ImmutableItemAddedEvent builder
-
-