Enum Class HurricaneEnum

java.lang.Object
java.lang.Enum<HurricaneEnum>
org.ka2ddo.aprs.HurricaneEnum
All Implemented Interfaces:
Serializable, Comparable<HurricaneEnum>, Constable, EnumWithImageName, EnumWithUnits

public enum HurricaneEnum extends Enum<HurricaneEnum> implements EnumWithImageName, EnumWithUnits
Symbolic codes for different types of hurricane/tropical storm information. The letter codes correspond to the hurricane comments in APRS position reports, as defined in the APRS protocol specification, chapter 12.
Author:
Andrew Pavlin, KA2DDO
See Also:
  • Enum Constant Details

  • Field Details

    • paramLen

      public final int paramLen
      Number of characters for parameter identified by this enum.
  • Method Details

    • values

      public static HurricaneEnum[] 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 HurricaneEnum 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
    • getImagePath

      public String getImagePath()
      Return the relative path name of the image file for this enum value.
      Specified by:
      getImagePath in interface EnumWithImageName
      Returns:
      path name String, or a two-character APRS symbol table ID and code
    • getEnumForLetter

      public static HurricaneEnum getEnumForLetter(char ch)
      Get the enumeration associated with the hurricane message letter code.
      Parameters:
      ch - letter to match against the known enums
      Returns:
      HurricaneEnum corresponding to the letter, or null if not matching any known hurricane parameter
    • getUnit

      public Enum<?> getUnit()
      Get the unit (if any) for values for this WeatherEnum,
      Specified by:
      getUnit in interface EnumWithUnits
      Returns:
      unit Enum, or null if no unit known
    • isUnitARate

      public boolean isUnitARate()
      Indicate whether values and units should be interpreted as a rate over an appropriate time unit rather than a fixed quantity.
      Specified by:
      isUnitARate in interface EnumWithUnits
      Returns:
      boolean true if unit is a rate rather than a scalar
    • getUnitScaling

      public float getUnitScaling()
      Get the scaling factor to apply to the unit for values for this WeatherEnum.
      Returns:
      float scale factor to apply to unit for displaying value, or Float.NaN if no unit
    • nonClonedValues

      public static HurricaneEnum[] nonClonedValues()
      Returns a single copy of the list of WeatherEnums. Callers should ensure they do not modify the returned array, as this could have unpredictable consequences to other users of the array.
      Returns:
      array of defined WeatherEnum values in enumerated order