Enum Class SortOrder
- All Implemented Interfaces:
Serializable,Comparable<SortOrder>,Constable
Defines standard sorting strategies for alarm events, allowing multi-column sort priorities.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionSort by Priority, then by State, then by Event Time.Sort by Priority, then by Event Time.Sort by State, then by Priority, then by Event Time.Sort by State, then by Event Time.Sort by Event Time. -
Method Summary
Modifier and TypeMethodDescriptionintcompare(AlarmEvent o1, AlarmEvent o2, boolean oldestFirst) Compares two alarm events based on this sort order.getOrder()static SortOrderReturns the enum constant of this class with the specified name.static SortOrder[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
State_Time
Sort by State, then by Event Time. -
State_Priority_Time
Sort by State, then by Priority, then by Event Time. -
Priority_State_Time
Sort by Priority, then by State, then by Event Time. -
Time
Sort by Event Time. -
Priority_Time
Sort by Priority, then by Event Time.
-
-
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
-
getOrder
-
compare
Compares two alarm events based on this sort order.- Parameters:
o1- The first alarm event.o2- The second alarm event.oldestFirst- Whether to sort with the oldest events first when comparing by time.- Returns:
- a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
-