public static enum Length.Units extends java.lang.Enum<Length.Units> implements Units, java.io.Serializable
Enum Constant and Description |
---|
ANGSTROM |
ASTRONOMICAL_UNIT |
CENTIMETRE |
EARTH_MEAN_DIAMETER |
FOOT |
INCH |
KILOMETRE |
LIGHT_YEAR |
METRE |
MICRON |
MILE |
MILLIMETRE |
NANOMETRE |
PARSEC |
PIXEL
Be careful with PIXEL - it is for use with net.grelf.image.Calibration
and without that its value in metres is set to 0, so do not try to
convert between PIXEL and other length units without a Calibration
object.
|
YARD |
Modifier and Type | Method and Description |
---|---|
Length.Units |
createUnitsFromName(java.lang.String unitsName)
Create an object of this type that matches the units name (ignoring
case).
|
java.util.List<java.lang.String> |
getNames()
Suitable for constructing a javax.swing.JComboBox, for user selection.
|
java.lang.String |
getSymbol() |
static Length.Units |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static Length.Units[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Length.Units PARSEC
public static final Length.Units LIGHT_YEAR
public static final Length.Units ASTRONOMICAL_UNIT
public static final Length.Units EARTH_MEAN_DIAMETER
public static final Length.Units KILOMETRE
public static final Length.Units METRE
public static final Length.Units CENTIMETRE
public static final Length.Units MILLIMETRE
public static final Length.Units MICRON
public static final Length.Units NANOMETRE
public static final Length.Units ANGSTROM
public static final Length.Units MILE
public static final Length.Units YARD
public static final Length.Units FOOT
public static final Length.Units INCH
public static final Length.Units PIXEL
public static Length.Units[] values()
for (Length.Units c : Length.Units.values()) System.out.println(c);
public static Length.Units 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 Length.Units createUnitsFromName(java.lang.String unitsName)
createUnitsFromName
in interface Units