t.21.120.2.source-code.RunExerciseName Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fit Show documentation
Show all versions of fit Show documentation
The Official Garmin FIT SDK
/////////////////////////////////////////////////////////////////////////////////////////////
// Copyright 2023 Garmin International, Inc.
// Licensed under the Flexible and Interoperable Data Transfer (FIT) Protocol License; you
// may not use this file except in compliance with the Flexible and Interoperable Data
// Transfer (FIT) Protocol License.
/////////////////////////////////////////////////////////////////////////////////////////////
// ****WARNING**** This file is auto-generated! Do NOT edit this file.
// Profile Version = 21.120Release
// Tag = production/release/21.120.00-0-g2d77811
/////////////////////////////////////////////////////////////////////////////////////////////
package com.garmin.fit;
import java.util.HashMap;
import java.util.Map;
public class RunExerciseName {
public static final int RUN = 0;
public static final int WALK = 1;
public static final int JOG = 2;
public static final int SPRINT = 3;
public static final int INVALID = Fit.UINT16_INVALID;
private static final Map stringMap;
static {
stringMap = new HashMap();
stringMap.put(RUN, "RUN");
stringMap.put(WALK, "WALK");
stringMap.put(JOG, "JOG");
stringMap.put(SPRINT, "SPRINT");
}
/**
* Retrieves the String Representation of the Value
* @param value The enum constant
* @return The name of this enum contsant
*/
public static String getStringFromValue( Integer value ) {
if( stringMap.containsKey( value ) ) {
return stringMap.get( value );
}
return "";
}
/**
* Returns the enum constant with the specified name.
* @param value The enum string value
* @return The enum constant or INVALID if unknown
*/
public static Integer getValueFromString( String value ) {
for( Map.Entry entry : stringMap.entrySet() ) {
if( entry.getValue().equals( value ) ) {
return entry.getKey();
}
}
return INVALID;
}
}