Package com.complexible.stardog.spatial

# Enum Class DistanceUnit

java.lang.Object
java.lang.Enum<DistanceUnit>
com.complexible.stardog.spatial.DistanceUnit

All Implemented Interfaces:
  `Serializable`, `Comparable<DistanceUnit>`, `Constable`

public enum DistanceUnit extends Enum<DistanceUnit>

The distance units for use with spatial queries

Since:
  4.0
Version:
  4.0
Author:
  Michael Grove

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class java.lang.Enum

  `Enum.EnumDesc<E extends Enum<E>>`

- ## Enum Constant Summary

  Enum Constants
  Enum Constant
  Description
  `Centimeter`
  `Degree`
  `Foot`
  `Inch`
  `Kilometer`
  `Meter`
  `Mile`
  `Radian`
  `Yard`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `double`
  `convert(double theValue, DistanceUnit theUnit)`
  Convert the value in the given unit to this unit
  `double`
  `toCentimeters(double theDistance)`
  `double`
  `toDegrees(double theDistance)`
  Convert this distance to degrees
  `double`
  `toFeet(double theDistance)`
  `double`
  `toInches(double theDistance)`
  `double`
  `toKilometers(double theDistance)`
  Convert this distance to kilometers
  `double`
  `toMeters(double theDistance)`
  `double`
  `toMiles(double theDistance)`
  Convert this distance to miles
  `double`
  `toRadians(double theDistance)`
  `double`
  `toYards(double theDistance)`
  `static DistanceUnit`
  `valueOf(String name)`
  Returns the enum constant of this class with the specified name.
  `static DistanceUnit[]`
  `values()`
  Returns an array containing the constants of this enum class, in the order they are declared.

  ### Methods inherited from class java.lang.Enum

  `clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

  ### Methods inherited from class java.lang.Object

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Enum Constant Details

  - ### Inch

    public static final DistanceUnit Inch

  - ### Foot

    public static final DistanceUnit Foot

  - ### Yard

    public static final DistanceUnit Yard

  - ### Mile

    public static final DistanceUnit Mile

  - ### Radian

    public static final DistanceUnit Radian

  - ### Degree

    public static final DistanceUnit Degree

  - ### Centimeter

    public static final DistanceUnit Centimeter

  - ### Meter

    public static final DistanceUnit Meter

  - ### Kilometer

    public static final DistanceUnit Kilometer

- ## Method Details

  - ### values

    public static DistanceUnit[] 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 DistanceUnit 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

  - ### toInches

    public double toInches(double theDistance)

  - ### toFeet

    public double toFeet(double theDistance)

  - ### toYards

    public double toYards(double theDistance)

  - ### toCentimeters

    public double toCentimeters(double theDistance)

  - ### toRadians

    public double toRadians(double theDistance)

  - ### toMeters

    public double toMeters(double theDistance)

  - ### toKilometers

    public double toKilometers(double theDistance)
    Convert this distance to kilometers
    Parameters:
      `theDistance` - the distance
    Returns:
      the distance in kilometers

  - ### toMiles

    public double toMiles(double theDistance)
    Convert this distance to miles
    Parameters:
      `theDistance` - the distance
    Returns:
      the distance in miles

  - ### toDegrees

    public double toDegrees(double theDistance)
    Convert this distance to degrees
    Parameters:
      `theDistance` - the distance
    Returns:
      the distance in degrees

  - ### convert

    public double convert(double theValue, DistanceUnit theUnit)
    Convert the value in the given unit to this unit
    Parameters:
      `theValue` - the value
      `theUnit` - the unit of the value
    Returns:
      the value converted to this unit