Class ImmutableItemAddedEvent
java.lang.Object
io.dialob.session.engine.session.command.event.ImmutableItemAddedEvent
- All Implemented Interfaces:
Event,ItemAddedEvent,Serializable
@Generated(from="ItemAddedEvent",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableItemAddedEvent
extends Object
implements ItemAddedEvent
Immutable implementation of
ItemAddedEvent.
Use the builder to create immutable instances:
ImmutableItemAddedEvent.builder().
Use the static factory method to create immutable instances:
ImmutableItemAddedEvent.of().
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableItemAddedEvent. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableItemAddedEvent.static ImmutableItemAddedEventcopyOf(ItemAddedEvent instance) Creates an immutable copy of aItemAddedEventvalue.booleanThis instance is equal to all instances ofImmutableItemAddedEventthat have equal attribute values.inthashCode()Computes a hash code from attributes:addItemId,prototypeId.static ImmutableItemAddedEventConstruct a new immutableItemAddedEventinstance.toString()Prints the immutable valueItemAddedEventwith attribute values.final ImmutableItemAddedEventwithAddItemId(ItemId value) Copy the current immutable object by setting a value for theaddItemIdattribute.final ImmutableItemAddedEventwithPrototypeId(ItemId value) Copy the current immutable object by setting a value for theprototypeIdattribute.
-
Method Details
-
getAddItemId
- Specified by:
getAddItemIdin interfaceItemAddedEvent- Returns:
- The value of the
addItemIdattribute
-
getPrototypeId
- Specified by:
getPrototypeIdin interfaceItemAddedEvent- Returns:
- The value of the
prototypeIdattribute
-
withAddItemId
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 or the
thisobject
-
withPrototypeId
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 or the
thisobject
-
equals
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
Prints the immutable valueItemAddedEventwith attribute values. -
of
Construct a new immutableItemAddedEventinstance.- Parameters:
addItemId- The value for theaddItemIdattributeprototypeId- The value for theprototypeIdattribute- Returns:
- An immutable ItemAddedEvent instance
-
copyOf
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
Creates a builder forImmutableItemAddedEvent.ImmutableItemAddedEvent.builder() .addItemId(io.dialob.session.engine.session.model.ItemId) // requiredaddItemId.prototypeId(io.dialob.session.engine.session.model.ItemId) // requiredprototypeId.build();- Returns:
- A new ImmutableItemAddedEvent builder
-