Package ddf.measure

Enum Class Distance.LinearUnit

java.lang.Object
java.lang.Enum<Distance.LinearUnit>
ddf.measure.Distance.LinearUnit
All Implemented Interfaces:
Serializable, Comparable<Distance.LinearUnit>, Constable
Enclosing class:
Distance

public static enum Distance.LinearUnit extends Enum<Distance.LinearUnit>
Enumeration for the linear units supported by DDF.
  • Enum Constant Details

  • Method Details

    • values

      public static Distance.LinearUnit[] 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 Distance.LinearUnit 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
    • fromString

      public static Distance.LinearUnit fromString(String enumValueString)
      Returns the Distance.LinearUnit enum constant corresponding to the string provided. It should be used as a replacement for the default valueOf() method.

      This method supports all the string representations provided when the enum constants are created. As opposed to valueOf(), this method is case-insensitive and will for instance work with nauticalmile, NAUTICALMILE and nauticalMile.

      Parameters:
      enumValueString - string representing the enum constant to return. Cannot be null or empty.
      Returns:
      enum constant corresponding to the string representation provided
      Throws:
      IllegalArgumentException - thrown if the string provided doesn't map to any enum constant, is null or empty