Enum Class UnitSystem

java.lang.Object
java.lang.Enum<UnitSystem>
slash.navigation.common.UnitSystem
All Implemented Interfaces:
Serializable, Comparable<UnitSystem>, Constable

public enum UnitSystem extends Enum<UnitSystem>
Enumeration of supported unit systems.
Author:
Christian Pesch
  • Enum Constant Details

  • Method Details

    • values

      public static UnitSystem[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static UnitSystem valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getDistanceName

      public String getDistanceName()
    • getShortDistanceName

      public String getShortDistanceName()
    • getElevationName

      public String getElevationName()
    • getSpeedName

      public String getSpeedName()
    • distanceToUnit

      public Double distanceToUnit(Double distance)
    • shortDistanceToUnit

      public Double shortDistanceToUnit(Double distance)
    • distanceToDefault

      public Double distanceToDefault(Double distance)
    • valueToUnit

      public Double valueToUnit(Double value)
    • valueToDefault

      public Double valueToDefault(Double value)
    • getUnitSystemsWithPreferredUnitSystem

      public static List<UnitSystem> getUnitSystemsWithPreferredUnitSystem(UnitSystem preferredUnitSystem)