- All Implemented Interfaces:
Serializable,Comparable<CollectionOrder>,Constable
A backing type for the
order type on a collection, e.g. order[shuffle] or
order[sequential]. This defines what order a collection should select songs from.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe collection will play songs in the order that it is defined.The collection will select songs randomly. -
Method Summary
Modifier and TypeMethodDescriptionstatic CollectionOrdergetFromString(String orderString) Retrieves theCollectionOrderassociated with the specified order string.Gets the user-input string of the order.static CollectionOrderReturns the enum constant of this class with the specified name.static CollectionOrder[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SHUFFLE
The collection will select songs randomly. -
SEQUENTIAL
The collection will play songs in the order that it is defined.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
getOrderString
Gets the user-input string of the order.- Returns:
- The string definition of the order
-
getFromString
Retrieves theCollectionOrderassociated with the specified order string.- Parameters:
orderString- The string representation of the collection order- Returns:
- The
CollectionOrdermatching the specified string - Throws:
IllegalStateException- If the specified string does not match any defined order
-