Class ImmutableTargetEvent
java.lang.Object
io.dialob.session.engine.session.command.event.ImmutableTargetEvent
- All Implemented Interfaces:
Event,TargetEvent,Serializable
@Generated(from="TargetEvent",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableTargetEvent
extends Object
implements TargetEvent
Immutable implementation of
TargetEvent.
Use the builder to create immutable instances:
ImmutableTargetEvent.builder().
Use the static factory method to create immutable instances:
ImmutableTargetEvent.of().
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableTargetEvent. -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableTargetEvent.Builderbuilder()Creates a builder forImmutableTargetEvent.static ImmutableTargetEventcopyOf(TargetEvent instance) Creates an immutable copy of aTargetEventvalue.booleanThis instance is equal to all instances ofImmutableTargetEventthat have equal attribute values.inthashCode()Computes a hash code from attributes:targetId.static ImmutableTargetEventConstruct a new immutableTargetEventinstance.toString()Prints the immutable valueTargetEventwith attribute values.final ImmutableTargetEventwithTargetId(ItemId value) Copy the current immutable object by setting a value for thetargetIdattribute.
-
Method Details
-
getTargetId
- Specified by:
getTargetIdin interfaceTargetEvent- Returns:
- The value of the
targetIdattribute
-
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.- Parameters:
value- A new value for targetId- Returns:
- A modified copy or the
thisobject
-
equals
This instance is equal to all instances ofImmutableTargetEventthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:targetId. -
toString
Prints the immutable valueTargetEventwith attribute values. -
of
Construct a new immutableTargetEventinstance.- Parameters:
targetId- The value for thetargetIdattribute- Returns:
- An immutable TargetEvent instance
-
copyOf
Creates an immutable copy of aTargetEventvalue. 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 TargetEvent instance
-
builder
Creates a builder forImmutableTargetEvent.ImmutableTargetEvent.builder() .targetId(io.dialob.session.engine.session.model.ItemId) // requiredtargetId.build();- Returns:
- A new ImmutableTargetEvent builder
-