EventPriority
enum EventPriority
Package: dev.joid.lib.ui.event · Module: core · Source: EventPriority.java
The order in which the listeners of one event run, from HIGHEST to LOWEST, then MONITOR.
Description
Section titled “Description”Listeners of the same priority run in the order they were added.
Once a listener cancels or consumes the event, the listeners after it do not run, except the MONITOR ones.
Learn more
Section titled “Learn more”Methods
Section titled “Methods”| Returns | Signature | Summary |
|---|---|---|
boolean | isMonitor() | Returns true for EventPriority.MONITOR. |
Values
Section titled “Values”| Value | Summary |
|---|---|
HIGHEST | Runs before every other listener. |
HIGH | Runs after HIGHEST, before NORMAL. |
NORMAL | The priority of a plain lambda. |
LOW | Runs after NORMAL, before LOWEST. |
LOWEST | Runs after every other listener that can change the event. |
MONITOR | Runs last, even after a cancel or a consume, and only reads: cancel() or consume() there throws an IllegalStateException. |
Method details
Section titled “Method details”isMonitor
Section titled “isMonitor”boolean isMonitor()
Returns true for EventPriority.MONITOR.
Value details
Section titled “Value details”HIGHEST
Section titled “HIGHEST”HIGHEST
Runs before every other listener.
HIGH
Runs after HIGHEST, before NORMAL.
NORMAL
Section titled “NORMAL”NORMAL
The priority of a plain lambda.
LOW
Runs after NORMAL, before LOWEST.
LOWEST
Section titled “LOWEST”LOWEST
Runs after every other listener that can change the event.
MONITOR
Section titled “MONITOR”MONITOR
Runs last, even after a cancel or a consume, and only reads: cancel() or consume() there throws an IllegalStateException.
Use it to log or count what happened.
fluent returns the instance, typed for chaining · factory creates an instance · signal also accepts a value that follows signals, as a signal, an expression or a lambda (When does JOID compute this value again?) · hook called by JOID, override it · abstract you implement it · default interface method with a body · static called on the class · protected visible to subclasses
