Enum Class SortPunishments

java.lang.Object
java.lang.Enum<SortPunishments>
space.arim.libertybans.api.select.SortPunishments
All Implemented Interfaces:
Serializable, Comparable<SortPunishments>, Constable

public enum SortPunishments extends Enum<SortPunishments>
Defines how punishments may be ordered.

Combining multiple values of SortPunishments directives into an array implies that defacto ordering will depend on each directive in sequence. Punishments will be initially sorted by the first ordering directive; punishments considered equal by the first directive will be sorted by the second ordering directive, and so on.
  • Enum Constant Details

    • NEWEST_FIRST

      public static final SortPunishments NEWEST_FIRST
      Punishments will be returned in descending date of enaction
    • OLDEST_FIRST

      public static final SortPunishments OLDEST_FIRST
      Punishments will be returned in ascending date of enaction
    • LATEST_END_DATE_FIRST

      public static final SortPunishments LATEST_END_DATE_FIRST
      Punishments will be returned in descending date of end time, permanent punishments coming first
    • SOONEST_END_DATE_FIRST

      public static final SortPunishments SOONEST_END_DATE_FIRST
      Punishments will be returned in ascending date of end time, permanent punishments coming last
  • Method Details

    • values

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