Record Class EnableEvent
java.lang.Object
java.lang.Record
net.flectone.pulse.model.event.lifecycle.EnableEvent
- Record Components:
cancelled- whether a listener vetoed the remaining startup worktype- the startup stageflectonePulse- the plugin instance
- All Implemented Interfaces:
Event
public record EnableEvent(boolean cancelled, EnableEvent.Type type, FlectonePulse flectonePulse)
extends Record
implements Event
Fired while the plugin starts up, once per
EnableEvent.Type stage.-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface Event
Event.Priority -
Constructor Summary
ConstructorsConstructorDescriptionEnableEvent(boolean cancelled, EnableEvent.Type type, FlectonePulse flectonePulse) Creates an instance of aEnableEventrecord class.EnableEvent(EnableEvent.Type type, FlectonePulse flectonePulse) 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.Returns the value of theflectonePulserecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.withCancelled(boolean cancelled) Returns a copy of this event with the cancelled flag set.withFlectonePulse(FlectonePulse flectonePulse) withType(EnableEvent.Type type)
-
Constructor Details
-
EnableEvent
Creates an event that has not been cancelled.- Parameters:
type- the startup stageflectonePulse- the plugin instance
-
EnableEvent
Creates an instance of aEnableEventrecord class.- Parameters:
cancelled- the value for thecancelledrecord componenttype- the value for thetyperecord componentflectonePulse- the value for theflectonePulserecord component
-
-
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).
-
withType
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withFlectonePulse
- 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
-
type
-
flectonePulse
Returns the value of theflectonePulserecord component.- Returns:
- the value of the
flectonePulserecord component
-