java.lang.Object
java.lang.Enum<SortOrder>
com.inductiveautomation.factorypmi.application.components.alarm.SortOrder
All Implemented Interfaces:
Serializable, Comparable<SortOrder>, Constable

public enum SortOrder extends Enum<SortOrder>
Defines standard sorting strategies for alarm events, allowing multi-column sort priorities.
  • Enum Constant Details

    • State_Time

      public static final SortOrder State_Time
      Sort by State, then by Event Time.
    • State_Priority_Time

      public static final SortOrder State_Priority_Time
      Sort by State, then by Priority, then by Event Time.
    • Priority_State_Time

      public static final SortOrder Priority_State_Time
      Sort by Priority, then by State, then by Event Time.
    • Time

      public static final SortOrder Time
      Sort by Event Time.
    • Priority_Time

      public static final SortOrder Priority_Time
      Sort by Priority, then by Event Time.
  • Method Details

    • values

      public static SortOrder[] 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

      public static SortOrder valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getOrder

      public AlarmProperty[] getOrder()
    • compare

      public int compare(AlarmEvent o1, AlarmEvent o2, boolean oldestFirst)
      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.