Package kr.toxicity.model.api
Enum Class BetterModelEventBus.Result
- All Implemented Interfaces:
Serializable,Comparable<BetterModelEventBus.Result>,Constable
- Enclosing interface:
BetterModelEventBus
Represents the outcome of an event publication.
- Since:
- 2.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe event processing failed or was canceled.No handlers were registered for this event type.The event was successfully processed by at least one subscriber. -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if the event was considered "triggered" (i.e., not canceled or failed).static BetterModelEventBus.ResultReturns the enum constant of this class with the specified name.static BetterModelEventBus.Result[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SUCCESS
The event was successfully processed by at least one subscriber.- Since:
- 2.0.0
-
FAIL
The event processing failed or was canceled.- Since:
- 2.0.0
-
NO_EVENT_HANDLER
No handlers were registered for this event type.- Since:
- 2.0.0
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
triggered
public boolean triggered()Checks if the event was considered "triggered" (i.e., not canceled or failed).Note that
NO_EVENT_HANDLERis considered triggered as the operation wasn't blocked.- Returns:
- true if triggered, false otherwise
- Since:
- 2.0.0
-