Record Class GenericTaggedEventMessage<E extends EventMessage>
java.lang.Object
java.lang.Record
org.axonframework.eventsourcing.eventstore.GenericTaggedEventMessage<E>
- Type Parameters:
E- The type ofEventMessagecarried by thisTaggedEventMessageimplementation.- Record Components:
event- TheEventMessagepaired with the giventags.- TheSetofTagsrelating to the givenevent.
- All Implemented Interfaces:
TaggedEventMessage<E>
public record GenericTaggedEventMessage<E extends EventMessage>(E extends EventMessage event, Set<Tag> tags)
extends Record
implements TaggedEventMessage<E>
- Since:
- 5.0.0
- Author:
- Steven van Beelen
-
Constructor Summary
ConstructorsConstructorDescriptionGenericTaggedEventMessage(E event, Set<Tag> tags) Compact constructing asserting that the giveneventandtagsare notnull. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.event()Returns the value of theeventrecord component.final inthashCode()Returns a hash code value for this object.tags()Returns the value of thetagsrecord component.final StringtoString()Returns a string representation of this record class.Construct a newTaggedEventMessageusing the givenupdaterto adjust theTaggedEventMessage.tags()of the newTaggedEventMessage.
-
Constructor Details
-
GenericTaggedEventMessage
Compact constructing asserting that the giveneventandtagsare notnull.
-
-
Method Details
-
updateTags
Description copied from interface:TaggedEventMessageConstruct a newTaggedEventMessageusing the givenupdaterto adjust theTaggedEventMessage.tags()of the newTaggedEventMessage.- Specified by:
updateTagsin interfaceTaggedEventMessage<E extends EventMessage>- Parameters:
updater- TheFunctionreturning a newSetofTagsbased on the existingTaggedEventMessage.tags().- Returns:
- A new
TaggedEventMessageusing the givenupdaterto adjust theTaggedEventMessage.tags()of the newTaggedEventMessage.
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
event
Returns the value of theeventrecord component.- Specified by:
eventin interfaceTaggedEventMessage<E extends EventMessage>- Returns:
- the value of the
eventrecord component
-
tags
Returns the value of thetagsrecord component.- Specified by:
tagsin interfaceTaggedEventMessage<E extends EventMessage>- Returns:
- the value of the
tagsrecord component
-