Record Class MessageFormattingEvent
java.lang.Object
java.lang.Record
net.flectone.pulse.model.event.message.MessageFormattingEvent
- All Implemented Interfaces:
Event
public record MessageFormattingEvent(boolean cancelled, MessageContext context)
extends Record
implements Event
-
Nested Class Summary
Nested classes/interfaces inherited from interface Event
Event.Priority -
Constructor Summary
ConstructorsConstructorDescriptionMessageFormattingEvent(boolean cancelled, MessageContext context) Creates an instance of aMessageFormattingEventrecord class.MessageFormattingEvent(MessageContext context) -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thecancelledrecord component.context()Returns the value of thecontextrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.withCancelled(boolean cancelled) withContext(MessageContext context)
-
Constructor Details
-
MessageFormattingEvent
-
MessageFormattingEvent
Creates an instance of aMessageFormattingEventrecord class.- Parameters:
cancelled- the value for thecancelledrecord componentcontext- the value for thecontextrecord component
-
-
Method Details
-
withContext
-
withCancelled
- Specified by:
withCancelledin interfaceEvent- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
toString
-
hashCode
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
cancelled
-
context
Returns the value of thecontextrecord component.- Returns:
- the value of the
contextrecord component
-