com.garmin.fit.SportBits2 Maven / Gradle / Ivy
/////////////////////////////////////////////////////////////////////////////////////////////
// Copyright 2024 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.158.0Release
// Tag = production/release/21.158.0-0-gc9428aa
/////////////////////////////////////////////////////////////////////////////////////////////
package com.garmin.fit;
import java.util.HashMap;
import java.util.Map;
public class SportBits2 {
public static final short MOUNTAINEERING = 0x01;
public static final short HIKING = 0x02;
public static final short MULTISPORT = 0x04;
public static final short PADDLING = 0x08;
public static final short FLYING = 0x10;
public static final short E_BIKING = 0x20;
public static final short MOTORCYCLING = 0x40;
public static final short BOATING = 0x80;
public static final short INVALID = Fit.UINT8Z_INVALID;
private static final Map stringMap;
static {
stringMap = new HashMap();
stringMap.put(MOUNTAINEERING, "MOUNTAINEERING");
stringMap.put(HIKING, "HIKING");
stringMap.put(MULTISPORT, "MULTISPORT");
stringMap.put(PADDLING, "PADDLING");
stringMap.put(FLYING, "FLYING");
stringMap.put(E_BIKING, "E_BIKING");
stringMap.put(MOTORCYCLING, "MOTORCYCLING");
stringMap.put(BOATING, "BOATING");
}
/**
* Retrieves the String Representation of the Value
* @param value The enum constant
* @return The name of this enum contsant
*/
public static String getStringFromValue( Short 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 Short getValueFromString( String value ) {
for( Map.Entry entry : stringMap.entrySet() ) {
if( entry.getValue().equals( value ) ) {
return entry.getKey();
}
}
return INVALID;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy