public enum LengthUnit extends java.lang.Enum<LengthUnit>
Enum Constant and Description |
---|
CENTIMETER
Centimeter unit.
|
FOOT_DECIMALS
Foot unit with decimals.
|
INCH
Foot/Inch unit followed by fraction.
|
INCH_DECIMALS
Inch unit with decimals.
|
INCH_FRACTION
Inch unit followed by fraction.
|
METER
Meter unit.
|
MILLIMETER
Millimeter unit.
|
Modifier and Type | Method and Description |
---|---|
static float |
centimeterToFoot(float length)
Returns the
length given in centimeters converted to feet. |
static float |
centimeterToInch(float length)
Returns the
length given in centimeters converted to inches. |
abstract float |
centimeterToUnit(float length)
Returns the
length given in centimeters converted
to a value expressed in this unit. |
static float |
footToCentimeter(float length)
Returns the
length given in feet converted to centimeters. |
abstract java.text.Format |
getAreaFormatWithUnit()
Returns a format able to format areas with their localized unit.
|
abstract java.text.Format |
getFormat()
Returns a format able to format lengths.
|
abstract java.text.Format |
getFormatWithUnit()
Returns a format able to format lengths with their localized unit.
|
abstract float |
getMagnetizedLength(float length,
float maxDelta)
Returns the value close to the given
length in centimeter under magnetism. |
float |
getMaximumElevation()
Returns the maximum value for elevation in centimeter.
|
abstract float |
getMaximumLength()
Returns the maximum value for length in centimeter.
|
abstract float |
getMinimumLength()
Returns the minimum value for length in centimeter.
|
abstract java.lang.String |
getName()
Returns a localized name of this unit.
|
abstract float |
getStepSize()
Returns the preferred step value for length in centimeter.
|
static float |
inchToCentimeter(float length)
Returns the
length given in inches converted to centimeters. |
boolean |
isMetric()
Returns
true if this unit belongs to Metric system. |
abstract float |
unitToCentimeter(float length)
Returns the
length given in this unit converted
to a value expressed in centimeter. |
static LengthUnit |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static LengthUnit[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final LengthUnit MILLIMETER
public static final LengthUnit CENTIMETER
public static final LengthUnit METER
public static final LengthUnit INCH
public static final LengthUnit INCH_FRACTION
public static final LengthUnit INCH_DECIMALS
public static final LengthUnit FOOT_DECIMALS
public static LengthUnit[] values()
for (LengthUnit c : LengthUnit.values()) System.out.println(c);
public static LengthUnit valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static float centimeterToInch(float length)
length
given in centimeters converted to inches.public static float centimeterToFoot(float length)
length
given in centimeters converted to feet.public static float inchToCentimeter(float length)
length
given in inches converted to centimeters.public static float footToCentimeter(float length)
length
given in feet converted to centimeters.public abstract java.text.Format getFormatWithUnit()
public abstract java.text.Format getFormat()
public abstract java.text.Format getAreaFormatWithUnit()
public abstract java.lang.String getName()
public abstract float getMagnetizedLength(float length, float maxDelta)
length
in centimeter under magnetism.public abstract float getMinimumLength()
public abstract float getMaximumLength()
public abstract float getStepSize()
public float getMaximumElevation()
public abstract float centimeterToUnit(float length)
length
given in centimeters converted
to a value expressed in this unit.public abstract float unitToCentimeter(float length)
length
given in this unit converted
to a value expressed in centimeter.public boolean isMetric()
true
if this unit belongs to Metric system.
© Copyright 2024 Space Mushrooms
Distributed under GNU General Public License