Package com.wrapper.spotify.enums
Enum ProductType
- java.lang.Object
-
- java.lang.Enum<ProductType>
-
- com.wrapper.spotify.enums.ProductType
-
- All Implemented Interfaces:
Serializable,Comparable<ProductType>
public enum ProductType extends Enum<ProductType>
An enumeration of all possible Spotify product types.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BASIC_DESKTOPDAYPASSFREEOPENPREMIUM
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetType()Get the Spotify product type as a string.static ProductTypekeyOf(String type)static ProductTypevalueOf(String name)Returns the enum constant of this type with the specified name.static ProductType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
BASIC_DESKTOP
public static final ProductType BASIC_DESKTOP
-
DAYPASS
public static final ProductType DAYPASS
-
FREE
public static final ProductType FREE
-
OPEN
public static final ProductType OPEN
-
PREMIUM
public static final ProductType PREMIUM
-
-
Field Detail
-
type
public final String type
-
-
Method Detail
-
values
public static ProductType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ProductType c : ProductType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ProductType 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 nameNullPointerException- if the argument is null
-
keyOf
public static ProductType keyOf(String type)
-
getType
public String getType()
Get the Spotify product type as a string.- Returns:
- The Spotify product type as a string.
-
-