Package io.dialob.executor.command
Class ImmutableEventMatchers.TargetIdEventMatcher
- java.lang.Object
-
- io.dialob.executor.command.ImmutableEventMatchers.TargetIdEventMatcher
-
- All Implemented Interfaces:
EventMatcher,EventMatchers.TargetIdEventMatcher,Serializable
- Enclosing class:
- ImmutableEventMatchers
@Immutable @CheckReturnValue public static final class ImmutableEventMatchers.TargetIdEventMatcher extends Object implements EventMatchers.TargetIdEventMatcher
Immutable implementation ofEventMatchers.TargetIdEventMatcher.Use the builder to create immutable instances:
ImmutableEventMatchers.TargetIdEventMatcher.builder(). Use the static factory method to create immutable instances:ImmutableEventMatchers.TargetIdEventMatcher.of().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableEventMatchers.TargetIdEventMatcher.BuilderBuilds instances of typeTargetIdEventMatcher.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableEventMatchers.TargetIdEventMatcher.Builderbuilder()Creates a builder forTargetIdEventMatcher.static ImmutableEventMatchers.TargetIdEventMatchercopyOf(EventMatchers.TargetIdEventMatcher instance)Creates an immutable copy of aEventMatchers.TargetIdEventMatchervalue.booleanequals(Object another)This instance is equal to all instances ofTargetIdEventMatcherthat have equal attribute values.ItemIdgetTargetId()inthashCode()Computes a hash code from attributes:targetId.static ImmutableEventMatchers.TargetIdEventMatcherof(ItemId targetId)Construct a new immutableTargetIdEventMatcherinstance.StringtoString()Prints the immutable valueTargetIdEventMatcherwith attribute values.ImmutableEventMatchers.TargetIdEventMatcherwithTargetId(ItemId value)Copy the current immutable object by setting a value for thetargetIdattribute.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.dialob.executor.command.EventMatchers.TargetIdEventMatcher
matches
-
-
-
-
Method Detail
-
getTargetId
public ItemId getTargetId()
- Specified by:
getTargetIdin interfaceEventMatchers.TargetIdEventMatcher- Returns:
- The value of the
targetIdattribute
-
withTargetId
public final ImmutableEventMatchers.TargetIdEventMatcher 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 ofTargetIdEventMatcherthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:targetId.
-
toString
public String toString()
Prints the immutable valueTargetIdEventMatcherwith attribute values.
-
of
public static ImmutableEventMatchers.TargetIdEventMatcher of(ItemId targetId)
Construct a new immutableTargetIdEventMatcherinstance.- Parameters:
targetId- The value for thetargetIdattribute- Returns:
- An immutable TargetIdEventMatcher instance
-
copyOf
public static ImmutableEventMatchers.TargetIdEventMatcher copyOf(EventMatchers.TargetIdEventMatcher instance)
Creates an immutable copy of aEventMatchers.TargetIdEventMatchervalue. 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 TargetIdEventMatcher instance
-
builder
public static ImmutableEventMatchers.TargetIdEventMatcher.Builder builder()
Creates a builder forTargetIdEventMatcher.ImmutableEventMatchers.TargetIdEventMatcher.builder() .targetId(io.dialob.executor.model.ItemId) // requiredtargetId.build();- Returns:
- A new TargetIdEventMatcher builder
-
-