All Downloads are FREE. Search and download functionalities are using the official Maven repository.

t.21.120.2.source-code.CourseCapabilities Maven / Gradle / Ivy

There is a newer version: 21.141.0
Show newest version
/////////////////////////////////////////////////////////////////////////////////////////////
// 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 CourseCapabilities  {
    public static final long PROCESSED = 0x00000001;
    public static final long VALID = 0x00000002;
    public static final long TIME = 0x00000004;
    public static final long DISTANCE = 0x00000008;
    public static final long POSITION = 0x00000010;
    public static final long HEART_RATE = 0x00000020;
    public static final long POWER = 0x00000040;
    public static final long CADENCE = 0x00000080;
    public static final long TRAINING = 0x00000100;
    public static final long NAVIGATION = 0x00000200;
    public static final long BIKEWAY = 0x00000400;
    public static final long AVIATION = 0x00001000; // Denote course files to be used as flight plans
    public static final long INVALID = Fit.UINT32Z_INVALID;

    private static final Map stringMap;

    static {
        stringMap = new HashMap();
        stringMap.put(PROCESSED, "PROCESSED");
        stringMap.put(VALID, "VALID");
        stringMap.put(TIME, "TIME");
        stringMap.put(DISTANCE, "DISTANCE");
        stringMap.put(POSITION, "POSITION");
        stringMap.put(HEART_RATE, "HEART_RATE");
        stringMap.put(POWER, "POWER");
        stringMap.put(CADENCE, "CADENCE");
        stringMap.put(TRAINING, "TRAINING");
        stringMap.put(NAVIGATION, "NAVIGATION");
        stringMap.put(BIKEWAY, "BIKEWAY");
        stringMap.put(AVIATION, "AVIATION");
    }


    /**
     * Retrieves the String Representation of the Value
     * @param value The enum constant
     * @return The name of this enum contsant
     */
    public static String getStringFromValue( Long 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 Long getValueFromString( String value ) {
        for( Map.Entry entry : stringMap.entrySet() ) {
            if( entry.getValue().equals( value ) ) {
                return entry.getKey();
            }
        }

        return INVALID;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy