Record Class StatusResponseEvent
java.lang.Object
java.lang.Record
net.flectone.pulse.model.event.message.StatusResponseEvent
- Record Components:
cancelled- whether a listener vetoed the changeresponse- the platform-specific response object
- All Implemented Interfaces:
Event
-
Nested Class Summary
Nested classes/interfaces inherited from interface Event
Event.Priority -
Constructor Summary
ConstructorsConstructorDescriptionStatusResponseEvent(boolean cancelled, Object response) Creates an instance of aStatusResponseEventrecord class.StatusResponseEvent(Object response) Creates an event that has not been cancelled. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thecancelledrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.response()Returns the value of theresponserecord component.final StringtoString()Returns a string representation of this record class.withCancelled(boolean cancelled) Returns a copy of this event with the cancelled flag set.withResponse(Object response)
-
Constructor Details
-
StatusResponseEvent
Creates an event that has not been cancelled.- Parameters:
response- the platform-specific response object
-
StatusResponseEvent
-
-
Method Details
-
withCancelled
Description copied from interface:EventReturns a copy of this event with the cancelled flag set.- Specified by:
withCancelledin interfaceEvent- Parameters:
cancelled- the new cancelled state- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withResponse
- 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
-
response
-