public enum StravaAthleteType extends Enum<StravaAthleteType> implements StravaReferenceType<Integer>
athlete’s default sport type: 0=cyclist, 1=runner
| Enum Constant and Description |
|---|
CYCLIST
Cyclist
|
RUNNER
Runner
|
UNKNOWN
Unknown
|
| Modifier and Type | Method and Description |
|---|---|
static StravaAthleteType |
create(Integer id)
Used by JSON deserialisation
|
String |
getDescription() |
Integer |
getId() |
Integer |
getValue()
Used by JSON serialisation
|
String |
toString() |
static StravaAthleteType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static StravaAthleteType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final StravaAthleteType CYCLIST
public static final StravaAthleteType RUNNER
public static final StravaAthleteType UNKNOWN
public static StravaAthleteType[] values()
for (StravaAthleteType c : StravaAthleteType.values()) System.out.println(c);
public static StravaAthleteType 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 StravaAthleteType create(Integer id)
id - The integer representation of the StravaAthleteType as returned by the Strava APIStravaAthleteType, or UNKNOWN if there is no matchAthleteTypeSerializer.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>AthleteTypeSerializer.serialize(StravaAthleteType, java.lang.reflect.Type, com.google.gson.JsonSerializationContext)public String toString()
toString in interface StravaReferenceType<Integer>toString in class Enum<StravaAthleteType>Enum.toString()Copyright © 2016 Dan Shannon. All rights reserved.