Package org.goplanit.utils.event
Enum EventListenerPriority
- java.lang.Object
-
- java.lang.Enum<EventListenerPriority>
-
- org.goplanit.utils.event.EventListenerPriority
-
- All Implemented Interfaces:
Serializable
,Comparable<EventListenerPriority>
public enum EventListenerPriority extends Enum<EventListenerPriority>
Priority that a listener can claim upon registration for events. The higher the claimed priority the earlier the listener is invoked comapred to lower priority calls.- Author:
- markr
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isHighest()
Verify if the priority is the highest priority availableboolean
isLowest()
Verify if the priority is the lowest priority availablestatic EventListenerPriority
valueOf(String name)
Returns the enum constant of this type with the specified name.static EventListenerPriority[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
HIGH
public static final EventListenerPriority HIGH
-
REGULAR
public static final EventListenerPriority REGULAR
-
LOW
public static final EventListenerPriority LOW
-
-
Method Detail
-
values
public static EventListenerPriority[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (EventListenerPriority c : EventListenerPriority.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static EventListenerPriority valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-
isLowest
public boolean isLowest()
Verify if the priority is the lowest priority available- Returns:
- true when lowest, false otherwise
-
isHighest
public boolean isHighest()
Verify if the priority is the highest priority available- Returns:
- true when lowest, false otherwise
-
-