com.pcauto.util
Class DistanceUnits

java.lang.Object
  extended bycom.pcauto.util.Units
      extended bycom.pcauto.util.DistanceUnits
All Implemented Interfaces:
java.io.Serializable

public final class DistanceUnits
extends Units

Used Java typesafe enum pattern to port C++ enum. See http://developer.java.sun.com/developer/Books/shiftintojava/page1.html#replaceenums.

See Also:
Serialized Form

Field Summary
static DistanceUnits[] ALL
           
static DistanceUnits CENTIMETRE
           
static DistanceUnits INCH
           
static DistanceUnits KILOMETRE
           
static DistanceUnits METRE
           
static DistanceUnits MICROMETRE
           
static DistanceUnits MILE
           
static DistanceUnits YARD
           
 
Fields inherited from class com.pcauto.util.Units
desc, id, str
 
Method Summary
 double convertFrom(double value, Units srcUnits)
           
 Units[] getAll()
           
 
Methods inherited from class com.pcauto.util.Units
getDesc, getId, getString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

METRE

public static final DistanceUnits METRE

MILE

public static final DistanceUnits MILE

KILOMETRE

public static final DistanceUnits KILOMETRE

INCH

public static final DistanceUnits INCH

CENTIMETRE

public static final DistanceUnits CENTIMETRE

YARD

public static final DistanceUnits YARD

MICROMETRE

public static final DistanceUnits MICROMETRE

ALL

public static final DistanceUnits[] ALL
Method Detail

getAll

public Units[] getAll()
Specified by:
getAll in class Units

convertFrom

public double convertFrom(double value,
                          Units srcUnits)
Specified by:
convertFrom in class Units