Package com.wrapper.spotify.enums
Enum ModelObjectType
- java.lang.Object
-
- java.lang.Enum<ModelObjectType>
-
- com.wrapper.spotify.enums.ModelObjectType
-
- All Implemented Interfaces:
Serializable,Comparable<ModelObjectType>
public enum ModelObjectType extends Enum<ModelObjectType>
An enumeration of all possible model object types.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetType()Get the model object type as a string.static ModelObjectTypekeyOf(String type)static ModelObjectTypevalueOf(String name)Returns the enum constant of this type with the specified name.static ModelObjectType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ALBUM
public static final ModelObjectType ALBUM
-
ARTIST
public static final ModelObjectType ARTIST
-
AUDIO_FEATURES
public static final ModelObjectType AUDIO_FEATURES
-
GENRE
public static final ModelObjectType GENRE
-
PLAYLIST
public static final ModelObjectType PLAYLIST
-
TRACK
public static final ModelObjectType TRACK
-
USER
public static final ModelObjectType USER
-
-
Field Detail
-
type
public final String type
-
-
Method Detail
-
values
public static ModelObjectType[] 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 (ModelObjectType c : ModelObjectType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ModelObjectType 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 ModelObjectType keyOf(String type)
-
getType
public String getType()
Get the model object type as a string.- Returns:
- The model object type as a string.
-
-