Class ImmutableEventMatchers.TargetIdEventMatcher
java.lang.Object
io.dialob.session.engine.session.command.ImmutableEventMatchers.TargetIdEventMatcher
- All Implemented Interfaces:
EventMatcher,EventMatchers.TargetIdEventMatcher,Serializable
- Enclosing class:
ImmutableEventMatchers
@Generated(from="EventMatchers.TargetIdEventMatcher",
generator="Immutables")
@Immutable
@CheckReturnValue
public static final class ImmutableEventMatchers.TargetIdEventMatcher
extends Object
implements EventMatchers.TargetIdEventMatcher
Immutable implementation of
EventMatchers.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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeTargetIdEventMatcher. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forTargetIdEventMatcher.copyOf(EventMatchers.TargetIdEventMatcher instance) Creates an immutable copy of aEventMatchers.TargetIdEventMatchervalue.booleanThis instance is equal to all instances ofTargetIdEventMatcherthat have equal attribute values.inthashCode()Computes a hash code from attributes:targetId.Construct a new immutableTargetIdEventMatcherinstance.toString()Prints the immutable valueTargetIdEventMatcherwith attribute values.withTargetId(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, waitMethods inherited from interface io.dialob.session.engine.session.command.EventMatchers.TargetIdEventMatcher
matches
-
Method Details
-
getTargetId
- Specified by:
getTargetIdin interfaceEventMatchers.TargetIdEventMatcher- 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 ofTargetIdEventMatcherthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:targetId. -
toString
Prints the immutable valueTargetIdEventMatcherwith attribute values. -
of
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
Creates a builder forTargetIdEventMatcher.ImmutableEventMatchers.TargetIdEventMatcher.builder() .targetId(io.dialob.session.engine.session.model.ItemId) // requiredtargetId.build();- Returns:
- A new TargetIdEventMatcher builder
-