Enum ForumChannel.SortOrder

java.lang.Object
java.lang.Enum<ForumChannel.SortOrder>
net.dv8tion.jda.api.entities.channel.concrete.ForumChannel.SortOrder
All Implemented Interfaces:
Serializable, Comparable<ForumChannel.SortOrder>
Enclosing interface:
ForumChannel

public static enum ForumChannel.SortOrder extends Enum<ForumChannel.SortOrder>
The order used to sort forum posts.
  • Enum Constant Details

    • RECENT_ACTIVITY

      public static final ForumChannel.SortOrder RECENT_ACTIVITY
      Sort by recent activity, including unarchive, message, reaction, and thread creation.
    • CREATION_TIME

      public static final ForumChannel.SortOrder CREATION_TIME
      Sort by the time the post was originally created.
    • UNKNOWN

      public static final ForumChannel.SortOrder UNKNOWN
      Placeholder for possible future order modes.
  • Method Details

    • values

      public static ForumChannel.SortOrder[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static ForumChannel.SortOrder 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 name
      NullPointerException - if the argument is null
    • getKey

      public int getKey()
      The underlying value as used by Discord.
      Returns:
      The raw order key
    • fromKey

      @Nonnull public static ForumChannel.SortOrder fromKey(int key)
      The ForumChannel.SortOrder for the provided key.
      Parameters:
      key - The key to get the ForumChannel.SortOrder for
      Returns:
      The ForumChannel.SortOrder for the provided key, or UNKNOWN if the key is not known