public enum StravaMeasurementMethod extends Enum<StravaMeasurementMethod>
Preferred measurement system for an athlete. Those of you living in the 19th century will prefer IMPERIAL
| Enum Constant and Description |
|---|
IMPERIAL
Imperial units
|
METRIC
Metric
|
UNKNOWN
Should never occur but may if Strava API behaviour has changed
|
| Modifier and Type | Method and Description |
|---|---|
static StravaMeasurementMethod |
create(String id)
Used by JSON deserialisation
|
String |
getDescription() |
String |
getId() |
String |
getValue()
Used by JSON serialisation
|
String |
toString() |
static StravaMeasurementMethod |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static StravaMeasurementMethod[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final StravaMeasurementMethod IMPERIAL
public static final StravaMeasurementMethod METRIC
public static final StravaMeasurementMethod UNKNOWN
Should never occur but may if Strava API behaviour has changed
public static StravaMeasurementMethod[] values()
for (StravaMeasurementMethod c : StravaMeasurementMethod.values()) System.out.println(c);
public static StravaMeasurementMethod 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 String getValue()
StravaMeasurementMethod to be used with the Strava APIMeasurementMethodSerializer.serialize(StravaMeasurementMethod, java.lang.reflect.Type, com.google.gson.JsonSerializationContext)public static StravaMeasurementMethod create(String id)
id - The string representation of the StravaMeasurementMethod returned by the Strava APIStravaMeasurementMethod, or UNKNOWN if there is no matchpublic String getId()
public String toString()
toString in class Enum<StravaMeasurementMethod>Enum.toString()public String getDescription()
Copyright © 2015 Dan Shannon. All rights reserved.