com.partnersoft.geometry.measurement
Enum LinearUnit

java.lang.Object
  extended by java.lang.Enum<LinearUnit>
      extended by com.partnersoft.geometry.measurement.LinearUnit
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<LinearUnit>

public enum LinearUnit
extends java.lang.Enum<LinearUnit>

Known linear units that can be converted by multiplication to and from meters.

Copyright 2008 Partner Software, Inc.

Version:
$Id$
Author:
Paul Reavis

Enum Constant Summary
CENTIMETER
           
DECIMETER
           
KILOMETER
           
METER
           
MICRON
           
MILLIMETER
           
STANDARD_FOOT
          Standard, or international, feet, are much less common in the U.S.
STANDARD_INCH
           
STANDARD_MILE
           
US_SURVEY_FOOT
          U.S.
US_SURVEY_INCH
           
US_SURVEY_MILE
           
 
Method Summary
static LinearUnit forName(java.lang.String name)
           
 double fromMeters(double meters)
           
 java.lang.String getAbbreviation()
           
 double getFromMetersFactor()
           
 java.lang.String getName()
           
 java.lang.String getPlural()
           
 double getToMetersFactor()
           
 double toMeters(double notMeters)
           
static LinearUnit valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static LinearUnit[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

MICRON

public static final LinearUnit MICRON

MILLIMETER

public static final LinearUnit MILLIMETER

CENTIMETER

public static final LinearUnit CENTIMETER

DECIMETER

public static final LinearUnit DECIMETER

METER

public static final LinearUnit METER

KILOMETER

public static final LinearUnit KILOMETER

US_SURVEY_FOOT

public static final LinearUnit US_SURVEY_FOOT
U.S. Survey Feet are the standard measure for U.S. State Plane coordinate systems. If in doubt what kind of feet to use, use these.


US_SURVEY_INCH

public static final LinearUnit US_SURVEY_INCH

US_SURVEY_MILE

public static final LinearUnit US_SURVEY_MILE

STANDARD_FOOT

public static final LinearUnit STANDARD_FOOT
Standard, or international, feet, are much less common in the U.S. If in doubt what kind of feet to use, use U.S. Survey Feet instead.


STANDARD_INCH

public static final LinearUnit STANDARD_INCH

STANDARD_MILE

public static final LinearUnit STANDARD_MILE
Method Detail

values

public static LinearUnit[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (LinearUnit c : LinearUnit.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static LinearUnit valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

forName

public static LinearUnit forName(java.lang.String name)

toMeters

public double toMeters(double notMeters)

fromMeters

public double fromMeters(double meters)

getFromMetersFactor

public double getFromMetersFactor()

getToMetersFactor

public double getToMetersFactor()

getName

public java.lang.String getName()

getPlural

public java.lang.String getPlural()

getAbbreviation

public java.lang.String getAbbreviation()