Enum AuctionSortType

java.lang.Object
java.lang.Enum<AuctionSortType>
com.olziedev.playerauctions.api.auction.AuctionSortType
All Implemented Interfaces:
Serializable, Comparable<AuctionSortType>, java.lang.constant.Constable

public enum AuctionSortType extends Enum<AuctionSortType>
List of all possible sort types.
  • Enum Constant Details

    • HIGHEST_PRICE

      public static final AuctionSortType HIGHEST_PRICE
      This constant is when the order will be from the highest price.
    • LOWEST_PRICE

      public static final AuctionSortType LOWEST_PRICE
      This constant is when the order will from the lowest price.
    • ALPHABETICAL

      public static final AuctionSortType ALPHABETICAL
      This constant is when the order will be from alphabetical order.
    • OLDEST_DATE

      public static final AuctionSortType OLDEST_DATE
      This constant is when the order will be when the auction was created the oldest.
    • NEWEST_DATE

      public static final AuctionSortType NEWEST_DATE
      This constant is when the order will be when the auction was created the newest.
    • AMOUNT

      public static final AuctionSortType AMOUNT
      This constant is when the order will be from the most amount of the item.
    • RANDOM

      public static final AuctionSortType RANDOM
      This constant is when the order will be random every x seconds.
  • Method Details

    • values

      public static AuctionSortType[] 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 AuctionSortType 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
    • getTypes

      public static List<AuctionSortType> getTypes(FileConfiguration configuration)
      Parameters:
      configuration - The configuration file to get the sort types from.
      Returns:
      The sort types from the configuration file.
    • handleSwitch

      public static AuctionSortType handleSwitch(AuctionSortType auctionSortType, FileConfiguration configuration, boolean next)
      Parameters:
      auctionSortType - The current sort type, or null if you want to get the next sort type from the config.
      configuration - The configuration file to get the sort types from.
      next - If you want to get the next sort type or the previous sort type.
      Returns:
      The previous sort type.
    • getName

      public String getName(FileConfiguration configuration)
      Parameters:
      configuration - The configuration to get the sort type from.
      Returns:
      The sort type name from the configuration.