public enum StravaSegmentActivityType extends Enum<StravaSegmentActivityType> implements StravaReferenceType<String>
Activity type associated with a StravaSegment
| Enum Constant and Description |
|---|
RIDE
Bike ride
|
RUN
Run
|
UNKNOWN
Should never occur but may if Strava API behaviour has changed
|
WALK
Walk
|
| Modifier and Type | Method and Description |
|---|---|
static StravaSegmentActivityType |
create(String id)
Used by JSON deserialisation
|
String |
getDescription() |
String |
getId() |
String |
getValue()
Used by JSON serialisation
|
String |
toString() |
static StravaSegmentActivityType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static StravaSegmentActivityType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final StravaSegmentActivityType RIDE
public static final StravaSegmentActivityType RUN
public static final StravaSegmentActivityType WALK
public static final StravaSegmentActivityType UNKNOWN
Should never occur but may if Strava API behaviour has changed
public static StravaSegmentActivityType[] values()
for (StravaSegmentActivityType c : StravaSegmentActivityType.values()) System.out.println(c);
public static StravaSegmentActivityType 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 StravaSegmentActivityType create(String id)
id - The string representation of the StravaSegmentActivityType as returned by the Strava APIStravaSegmentActivityType, 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>StravaSegmentActivityType to be used with the Strava APISegmentActivityTypeSerializer.serialize(StravaSegmentActivityType, java.lang.reflect.Type, com.google.gson.JsonSerializationContext)public String toString()
toString in interface StravaReferenceType<String>toString in class Enum<StravaSegmentActivityType>Enum.toString()Copyright © 2016 Dan Shannon. All rights reserved.