Enum IPostContainer.SortOrder

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

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

    • RECENT_ACTIVITY

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

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

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

    • values

      public static IPostContainer.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 IPostContainer.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 IPostContainer.SortOrder fromKey(int key)
      The IPostContainer.SortOrder for the provided key.
      Parameters:
      key - The key to get the IPostContainer.SortOrder for
      Returns:
      The IPostContainer.SortOrder for the provided key, or UNKNOWN if the key is not known