Enum AuctionSortType
- All Implemented Interfaces:
Serializable
,Comparable<AuctionSortType>
,java.lang.constant.Constable
List of all possible sort types.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThis constant is when the order will be from alphabetical order.This constant is when the order will be from the most amount of the item.This constant is when the order will be from the highest price.This constant is when the order will from the lowest price.This constant is when the order will be when the auction was created the newest.This constant is when the order will be when the auction was created the oldest.This constant is when the order will be random every x seconds. -
Method Summary
Modifier and TypeMethodDescriptiongetName
(FileConfiguration configuration) static List<AuctionSortType>
getTypes
(FileConfiguration configuration) static AuctionSortType
handleSwitch
(AuctionSortType auctionSortType, FileConfiguration configuration, boolean next) static AuctionSortType
Returns the enum constant of this type with the specified name.static AuctionSortType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
HIGHEST_PRICE
This constant is when the order will be from the highest price. -
LOWEST_PRICE
This constant is when the order will from the lowest price. -
ALPHABETICAL
This constant is when the order will be from alphabetical order. -
OLDEST_DATE
This constant is when the order will be when the auction was created the oldest. -
NEWEST_DATE
This constant is when the order will be when the auction was created the newest. -
AMOUNT
This constant is when the order will be from the most amount of the item. -
RANDOM
This constant is when the order will be random every x seconds.
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
getTypes
- 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
- Parameters:
configuration
- The configuration to get the sort type from.- Returns:
- The sort type name from the configuration.
-