com.mapinfo.midev.unit

## Class LinearUnit

- java.lang.Object
- - java.lang.Enum
  - - com.mapinfo.midev.unit.LinearUnit

All Implemented Interfaces:
  Serializable, Comparable

    public final class LinearUnit
    extends Enum

A unit of measure for length.

See Also:
  Serialized Form

### Field Summary

Fields
`static LinearUnit` `CENTIMETER` A LinearUnit representing centimeters.
`static LinearUnit` `CHAIN` A LinearUnit representing chains (66 feet).
`static LinearUnit` `CM` A LinearUnit representing centimeters.
`static LinearUnit` `FOOT` A LinearUnit representing feet.
`static LinearUnit` `FT` A LinearUnit representing feet.
`static LinearUnit` `IN` A LinearUnit representing inches.
`static LinearUnit` `INCH` A LinearUnit representing inches.
`static LinearUnit` `KILOMETER` A LinearUnit representing kilometers.
`static LinearUnit` `KM` A LinearUnit representing kilometers.
`static LinearUnit` `LINK` A LinearUnit representing links (1/100 chain, 0.66 feet).
`static LinearUnit` `M` A LinearUnit representing meters.
`static LinearUnit` `METER` A LinearUnit representing meters.
`static LinearUnit` `MI` A LinearUnit representing miles.
`static LinearUnit` `MILE` A LinearUnit representing miles.
`static LinearUnit` `MILLIMETER` A LinearUnit representing millimeters.
`static LinearUnit` `MM` A LinearUnit representing millimeters.
`static LinearUnit` `NAUTICAL_MILE` A LinearUnit representing nautical miles.
`static LinearUnit` `PICA` A LinearUnit representing inches (12 point or 1/6 inch).
`static LinearUnit` `POINT` A LinearUnit representing points (1/72 inch).
`static LinearUnit` `ROD` A LinearUnit representing rods.
`static LinearUnit` `SURVEY_FOOT` A LinearUnit representing US survey feet.
`static LinearUnit` `TWIP` A LinearUnit representing twips (1/20 point or 1/1440 inch).
`static LinearUnit` `YARD` A LinearUnit representing yards.
`static LinearUnit` `YD` A LinearUnit representing yards.

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`static double` `convert(double length, LinearUnit fromUnit, LinearUnit toUnit)` Convert the specified length to its equivalent value in another linear unit.
`double` `getMetersPerUnit()` Get the number of meters equivalent to one of this unit of measure.
`static LinearUnit` `valueOf(String name)`
`static LinearUnit` `valueOfIgnoreCase(String name)` returns the LinearUnit with the specified name.
`static LinearUnit[]` `values()`

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

`compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

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

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

### Field Detail

#### INCH

    public static final LinearUnit INCH

A LinearUnit representing inches.

#### IN

    public static final LinearUnit IN

A LinearUnit representing inches.

#### FOOT

    public static final LinearUnit FOOT

A LinearUnit representing feet.

#### FT

    public static final LinearUnit FT

A LinearUnit representing feet.

#### YARD

    public static final LinearUnit YARD

A LinearUnit representing yards.

#### YD

    public static final LinearUnit YD

A LinearUnit representing yards.

#### MILE

    public static final LinearUnit MILE

A LinearUnit representing miles.

#### MI

    public static final LinearUnit MI

A LinearUnit representing miles.

#### MILLIMETER

    public static final LinearUnit MILLIMETER

A LinearUnit representing millimeters.

#### MM

    public static final LinearUnit MM

A LinearUnit representing millimeters.

#### CENTIMETER

    public static final LinearUnit CENTIMETER

A LinearUnit representing centimeters.

#### CM

    public static final LinearUnit CM

A LinearUnit representing centimeters.

#### METER

    public static final LinearUnit METER

A LinearUnit representing meters.

#### M

    public static final LinearUnit M

A LinearUnit representing meters.

#### KILOMETER

    public static final LinearUnit KILOMETER

A LinearUnit representing kilometers.

#### KM

    public static final LinearUnit KM

A LinearUnit representing kilometers.

#### SURVEY_FOOT

    public static final LinearUnit SURVEY_FOOT

A LinearUnit representing US survey feet.

#### NAUTICAL_MILE

    public static final LinearUnit NAUTICAL_MILE

A LinearUnit representing nautical miles.

#### LINK

    public static final LinearUnit LINK

A LinearUnit representing links (1/100 chain, 0.66 feet).

#### CHAIN

    public static final LinearUnit CHAIN

A LinearUnit representing chains (66 feet).

#### ROD

    public static final LinearUnit ROD

A LinearUnit representing rods.

#### TWIP

    public static final LinearUnit TWIP

A LinearUnit representing twips (1/20 point or 1/1440 inch).

#### POINT

    public static final LinearUnit POINT

A LinearUnit representing points (1/72 inch).

#### PICA

    public static final LinearUnit PICA

A LinearUnit representing inches (12 point or 1/6 inch).

### Method Detail

#### values

    public static LinearUnit[] values()

#### valueOf

    public static LinearUnit valueOf(String name)

#### getMetersPerUnit

    public double getMetersPerUnit()

Get the number of meters equivalent to one of this unit of measure.

Returns:
  The number of meters equivalent to one of this unit of measure.

#### convert

    public static double convert(double length,
                                 LinearUnit fromUnit,
                                 LinearUnit toUnit)

Convert the specified length to its equivalent value in another linear unit.

Parameters:
  `length` - An length with unit fromUnit
  `fromUnit` - The linear unit of the specified length.
  `toUnit` - The linear unit for the converted value.
Returns:
  The converted length in the specified units.

#### valueOfIgnoreCase

    public static LinearUnit valueOfIgnoreCase(String name)

returns the LinearUnit with the specified name.

Parameters:
  `name` - name of LinearUnit constant to return
Returns:
  LinearUnit with the specified name.
Throws:
  `IllegalArgumentException` - is thrown if name is null or invalid