public enum StravaSportType extends Enum<StravaSportType> implements StravaReferenceType<String>
Strava sport type associated with clubs
| Enum Constant and Description |
|---|
CYCLING
Cycling
|
OTHER
Other sport types
|
RUNNING
Running
|
TRIATHLON
Triathlon
|
UNKNOWN
Should never occur but may if Strava API behaviour has changed
|
| Modifier and Type | Method and Description |
|---|---|
static StravaSportType |
create(String id)
Used by JSON deserialisation
|
String |
getDescription() |
String |
getId() |
String |
getValue()
Used by JSON serialisation
|
String |
toString() |
static StravaSportType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static StravaSportType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final StravaSportType CYCLING
public static final StravaSportType RUNNING
public static final StravaSportType TRIATHLON
public static final StravaSportType OTHER
public static final StravaSportType UNKNOWN
Should never occur but may if Strava API behaviour has changed
public static StravaSportType[] values()
for (StravaSportType c : StravaSportType.values()) System.out.println(c);
public static StravaSportType 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 StravaSportType create(String id)
id - The string representation of a StravaSportType as returned by the Strava APIStravaSportType, or UNKNOWN if there is no matchSportTypeSerializer.deserialize(com.google.gson.JsonElement, java.lang.reflect.Type, com.google.gson.JsonDeserializationContext)public String getDescription()
getDescription in interface StravaReferenceType<String>public String getId()
getId in interface StravaReferenceType<String>public String getValue()
getValue in interface StravaReferenceType<String>StravaSportType to be used with the Strava APISportTypeSerializer.serialize(StravaSportType, java.lang.reflect.Type, com.google.gson.JsonSerializationContext)public String toString()
toString in interface StravaReferenceType<String>toString in class Enum<StravaSportType>Enum.toString()Copyright © 2016 Dan Shannon. All rights reserved.