Module JNISpice
Package spice.basic

Class DistanceUnits


  • public class DistanceUnits
    extends Units
    Class DistanceUnits represents distance units and supports conversion between them.

    Version 1.0.0 21-DEC-2009 (NJB)

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private DistanceUnits​(java.lang.String name)  
    • Method Summary

      Modifier and Type Method Description
      double toKm()
      Return the magnitude of this unit in km.
      java.lang.String toString()
      Return the name of this unit as a String.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • AU

        public static final DistanceUnits AU
        AU represents astronomical units.
      • KM

        public static final DistanceUnits KM
        KM represents kilometers
      • METERS

        public static final DistanceUnits METERS
        METERS represents meters.
      • name

        private final java.lang.String name
    • Constructor Detail

      • DistanceUnits

        private DistanceUnits​(java.lang.String name)
    • Method Detail

      • toString

        public java.lang.String toString()
        Return the name of this unit as a String.
        Specified by:
        toString in class Units
        Returns:
        String
      • toKm

        public double toKm()
                    throws SpiceException
        Return the magnitude of this unit in km.
        Returns:
        double
        Throws:
        SpiceException - exception