public enum StravaGender extends Enum<StravaGender> implements StravaReferenceType<String>
Athlete gender
| Enum Constant and Description |
|---|
FEMALE
Female
|
MALE
Male
|
UNKNOWN
Should never occur but may if Strava API behaviour has changed
|
| Modifier and Type | Method and Description |
|---|---|
static StravaGender |
create(String id)
Used by JSON deserialisation
|
String |
getDescription() |
String |
getId() |
String |
getValue()
Used by JSON serialisation
|
String |
toString() |
static StravaGender |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static StravaGender[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final StravaGender MALE
public static final StravaGender FEMALE
public static final StravaGender UNKNOWN
Should never occur but may if Strava API behaviour has changed
public static StravaGender[] values()
for (StravaGender c : StravaGender.values()) System.out.println(c);
public static StravaGender 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 StravaGender create(String id)
id - The string representation of the StravaGender returned by the Strava APIStravaGender, or UNKNOWN if there is no matchpublic String getDescription()
getDescription in interface StravaReferenceType<String>public String getId()
getId in interface StravaReferenceType<String>public String getValue()
getValue in interface StravaReferenceType<String>StravaGender to be used with the Strava APIGenderSerializer.serialize(StravaGender, java.lang.reflect.Type, com.google.gson.JsonSerializationContext)public String toString()
toString in interface StravaReferenceType<String>toString in class Enum<StravaGender>Enum.toString()Copyright © 2016 Dan Shannon. All rights reserved.