Package io.dialob.executor.command.event
Class ImmutableTargetEvent
- java.lang.Object
-
- io.dialob.executor.command.event.ImmutableTargetEvent
-
- All Implemented Interfaces:
Event,TargetEvent,Serializable
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableTargetEvent extends Object implements TargetEvent
Immutable implementation ofTargetEvent.Use the builder to create immutable instances:
ImmutableTargetEvent.builder(). Use the static factory method to create immutable instances:ImmutableTargetEvent.of().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableTargetEvent.BuilderBuilds instances of typeImmutableTargetEvent.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableTargetEvent.Builderbuilder()Creates a builder forImmutableTargetEvent.static ImmutableTargetEventcopyOf(TargetEvent instance)Creates an immutable copy of aTargetEventvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableTargetEventthat have equal attribute values.ItemIdgetTargetId()inthashCode()Computes a hash code from attributes:targetId.static ImmutableTargetEventof(ItemId targetId)Construct a new immutableTargetEventinstance.StringtoString()Prints the immutable valueTargetEventwith attribute values.ImmutableTargetEventwithTargetId(ItemId value)Copy the current immutable object by setting a value for thetargetIdattribute.
-
-
-
Method Detail
-
getTargetId
public ItemId getTargetId()
- Specified by:
getTargetIdin interfaceTargetEvent- Returns:
- The value of the
targetIdattribute
-
withTargetId
public final ImmutableTargetEvent 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.- Parameters:
value- A new value for targetId- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableTargetEventthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:targetId.
-
toString
public String toString()
Prints the immutable valueTargetEventwith attribute values.
-
of
public static ImmutableTargetEvent of(ItemId targetId)
Construct a new immutableTargetEventinstance.- Parameters:
targetId- The value for thetargetIdattribute- Returns:
- An immutable TargetEvent instance
-
copyOf
public static ImmutableTargetEvent copyOf(TargetEvent instance)
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
public static ImmutableTargetEvent.Builder builder()
Creates a builder forImmutableTargetEvent.ImmutableTargetEvent.builder() .targetId(io.dialob.executor.model.ItemId) // requiredtargetId.build();- Returns:
- A new ImmutableTargetEvent builder
-
-