public enum StravaWorkoutType extends Enum<StravaWorkoutType> implements StravaReferenceType<Integer>
Workout types associated with activities
| Enum Constant and Description |
|---|
DEFAULT
Default
|
INTERVALS
Intervals
|
LONG_RUN
Long run
|
RACE
Race
|
UNKNOWN
Should never occur but may if Strava API behaviour has changed
|
| Modifier and Type | Method and Description |
|---|---|
static StravaWorkoutType |
create(Integer id)
Used by JSON deserialisation
|
String |
getDescription() |
Integer |
getId() |
Integer |
getValue()
Used by JSON serialisation
|
String |
toString() |
static StravaWorkoutType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static StravaWorkoutType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final StravaWorkoutType DEFAULT
public static final StravaWorkoutType RACE
public static final StravaWorkoutType LONG_RUN
public static final StravaWorkoutType INTERVALS
public static final StravaWorkoutType UNKNOWN
Should never occur but may if Strava API behaviour has changed
public static StravaWorkoutType[] values()
for (StravaWorkoutType c : StravaWorkoutType.values()) System.out.println(c);
public static StravaWorkoutType valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic static StravaWorkoutType create(Integer id)
id - The integer representation of a StravaWorkoutType as returned by the Strava APIStravaWorkoutType, or UNKNOWN if there is no matchWorkoutTypeSerializer.deserialize(com.google.gson.JsonElement, java.lang.reflect.Type, com.google.gson.JsonDeserializationContext)public String getDescription()
getDescription in interface StravaReferenceType<Integer>public Integer getId()
getId in interface StravaReferenceType<Integer>public Integer getValue()
getValue in interface StravaReferenceType<Integer>StravaWorkoutType to be used with the Strava APIWorkoutTypeSerializer.serialize(StravaWorkoutType, java.lang.reflect.Type, com.google.gson.JsonSerializationContext)public String toString()
toString in interface StravaReferenceType<Integer>toString in class Enum<StravaWorkoutType>Enum.toString()Copyright © 2016 Dan Shannon. All rights reserved.