Package gov.nih.mipav.model.file
Enum FileInfoBase.Unit
- All Implemented Interfaces:
Serializable,Comparable<FileInfoBase.Unit>,java.lang.constant.Constable
- Enclosing class:
FileInfoBase
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionUnit of measurement angstroms.Unit of measurement centimeters.DegreesUnit of measurement hours.Unit of measurement hertz.Unit of measurement inches.Unit of measurement kilometers.Unit of measurement meters.Meters per secondUnit of measurement micrometers.Unit of measurement microseconds.Unit of measurement miles.Unit of measurement millimeters.Unit of measurement milliseconds.Units of measurement mil (thousandth of an inch)Unit of measurement minutes.Unit of measurement nanometers.Unit of measurement nanoseconds.Unit of measurement part-per-million.Radians per second.Unit of measurement seconds.Unit of measurement unknown. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Stringprivate doubleprivate intprivate Stringprivate FileInfoBase.UnitType -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateUnit(int legacyNum, String str, String abbrev, FileInfoBase.UnitType type) privateUnit(int legacyNum, String str, String abbrev, FileInfoBase.UnitType type, double convFactor) -
Method Summary
Modifier and TypeMethodDescriptiondoubleconvertFrom(double origValue, FileInfoBase.Unit origUnit) Method converts theorigValuethat is currently in units oforigUnitto the units specified bythisunit.doubleconvertTo(double origValue, FileInfoBase.Unit resultUnit) Method converts theorigValuequantity from the current units to theresultUnit.doublegetConversionFactor(FileInfoBase.Unit resultUnit) doubleintgetType()static FileInfoBase.Unitstatic FileInfoBase.UnitgetUnitFromAbbrev(String abbrev) static FileInfoBase.UnitgetUnitFromLegacyNum(int legacyNum) toString()static FileInfoBase.UnitReturns the enum constant of this type with the specified name.static FileInfoBase.Unit[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
UNKNOWN_MEASURE
Unit of measurement unknown. -
INCHES
Unit of measurement inches. -
MILS
Units of measurement mil (thousandth of an inch) -
CENTIMETERS
Unit of measurement centimeters. -
ANGSTROMS
Unit of measurement angstroms. -
NANOMETERS
Unit of measurement nanometers. -
MICROMETERS
Unit of measurement micrometers. -
MILLIMETERS
Unit of measurement millimeters. -
METERS
Unit of measurement meters. -
KILOMETERS
Unit of measurement kilometers. -
MILES
Unit of measurement miles. -
NANOSEC
Unit of measurement nanoseconds. -
MICROSEC
Unit of measurement microseconds. -
MILLISEC
Unit of measurement milliseconds. -
SECONDS
Unit of measurement seconds. -
MINUTES
Unit of measurement minutes. -
HOURS
Unit of measurement hours. -
HZ
Unit of measurement hertz. -
PPM
Unit of measurement part-per-million. -
RADS
Radians per second. -
DEGREES
Degrees -
METERS_PER_SEC
Meters per second
-
-
Field Details
-
legacyNum
private int legacyNum -
str
-
abbrev
-
type
-
convFactor
private double convFactor
-
-
Constructor Details
-
Unit
-
Unit
private Unit(int legacyNum, String str, String abbrev, FileInfoBase.UnitType type, double convFactor)
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
toString
- Overrides:
toStringin classEnum<FileInfoBase.Unit>
-
getAbbrev
-
getType
-
getConvFactor
public double getConvFactor() -
getLegacyNum
public int getLegacyNum() -
convertTo
Method converts theorigValuequantity from the current units to theresultUnit.- Parameters:
origValue- A value in units ofthisresultUnit- The units to convert to- Returns:
- The converted quantity
-
convertFrom
Method converts theorigValuethat is currently in units oforigUnitto the units specified bythisunit.- Parameters:
origValue- A value in units oforigUnitorigUnit- The current units of the quantity specified- Returns:
- The quantity converted into the current units
-
getConversionFactor
-
getUnit
-
getUnitFromAbbrev
-
getUnitFromLegacyNum
-