Package gov.nih.mipav.model.file
Enum FileInfoBase.Unit
- java.lang.Object
-
- java.lang.Enum<FileInfoBase.Unit>
-
- gov.nih.mipav.model.file.FileInfoBase.Unit
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<FileInfoBase.Unit>
- Enclosing class:
- FileInfoBase
public static enum FileInfoBase.Unit extends java.lang.Enum<FileInfoBase.Unit>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classFileInfoBase.Unit.UnsupportedUnitConversion
-
Enum Constant Summary
Enum Constants Enum Constant Description ANGSTROMSUnit of measurement angstroms.CENTIMETERSUnit of measurement centimeters.DEGREESDegreesHOURSUnit of measurement hours.HZUnit of measurement hertz.INCHESUnit of measurement inches.KILOMETERSUnit of measurement kilometers.METERSUnit of measurement meters.METERS_PER_SECMeters per secondMICROMETERSUnit of measurement micrometers.MICROSECUnit of measurement microseconds.MILESUnit of measurement miles.MILLIMETERSUnit of measurement millimeters.MILLISECUnit of measurement milliseconds.MILSUnits of measurement mil (thousandth of an inch)MINUTESUnit of measurement minutes.NANOMETERSUnit of measurement nanometers.NANOSECUnit of measurement nanoseconds.PPMUnit of measurement part-per-million.RADSRadians per second.SECONDSUnit of measurement seconds.UNKNOWN_MEASUREUnit of measurement unknown.
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Stringabbrevprivate doubleconvFactorprivate intlegacyNumprivate java.lang.Stringstrprivate FileInfoBase.UnitTypetype
-
Constructor Summary
Constructors Modifier Constructor Description privateUnit(int legacyNum, java.lang.String str, java.lang.String abbrev, FileInfoBase.UnitType type)privateUnit(int legacyNum, java.lang.String str, java.lang.String abbrev, FileInfoBase.UnitType type, double convFactor)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description doubleconvertFrom(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.java.lang.StringgetAbbrev()doublegetConversionFactor(FileInfoBase.Unit resultUnit)doublegetConvFactor()intgetLegacyNum()FileInfoBase.UnitTypegetType()static FileInfoBase.UnitgetUnit(java.lang.String str)static FileInfoBase.UnitgetUnitFromAbbrev(java.lang.String abbrev)static FileInfoBase.UnitgetUnitFromLegacyNum(int legacyNum)java.lang.StringtoString()static FileInfoBase.UnitvalueOf(java.lang.String name)Returns 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 Detail
-
UNKNOWN_MEASURE
public static final FileInfoBase.Unit UNKNOWN_MEASURE
Unit of measurement unknown.
-
INCHES
public static final FileInfoBase.Unit INCHES
Unit of measurement inches.
-
MILS
public static final FileInfoBase.Unit MILS
Units of measurement mil (thousandth of an inch)
-
CENTIMETERS
public static final FileInfoBase.Unit CENTIMETERS
Unit of measurement centimeters.
-
ANGSTROMS
public static final FileInfoBase.Unit ANGSTROMS
Unit of measurement angstroms.
-
NANOMETERS
public static final FileInfoBase.Unit NANOMETERS
Unit of measurement nanometers.
-
MICROMETERS
public static final FileInfoBase.Unit MICROMETERS
Unit of measurement micrometers.
-
MILLIMETERS
public static final FileInfoBase.Unit MILLIMETERS
Unit of measurement millimeters.
-
METERS
public static final FileInfoBase.Unit METERS
Unit of measurement meters.
-
KILOMETERS
public static final FileInfoBase.Unit KILOMETERS
Unit of measurement kilometers.
-
MILES
public static final FileInfoBase.Unit MILES
Unit of measurement miles.
-
NANOSEC
public static final FileInfoBase.Unit NANOSEC
Unit of measurement nanoseconds.
-
MICROSEC
public static final FileInfoBase.Unit MICROSEC
Unit of measurement microseconds.
-
MILLISEC
public static final FileInfoBase.Unit MILLISEC
Unit of measurement milliseconds.
-
SECONDS
public static final FileInfoBase.Unit SECONDS
Unit of measurement seconds.
-
MINUTES
public static final FileInfoBase.Unit MINUTES
Unit of measurement minutes.
-
HOURS
public static final FileInfoBase.Unit HOURS
Unit of measurement hours.
-
HZ
public static final FileInfoBase.Unit HZ
Unit of measurement hertz.
-
PPM
public static final FileInfoBase.Unit PPM
Unit of measurement part-per-million.
-
RADS
public static final FileInfoBase.Unit RADS
Radians per second.
-
DEGREES
public static final FileInfoBase.Unit DEGREES
Degrees
-
METERS_PER_SEC
public static final FileInfoBase.Unit METERS_PER_SEC
Meters per second
-
-
Field Detail
-
legacyNum
private int legacyNum
-
str
private java.lang.String str
-
abbrev
private java.lang.String abbrev
-
type
private FileInfoBase.UnitType type
-
convFactor
private double convFactor
-
-
Constructor Detail
-
Unit
private Unit(int legacyNum, java.lang.String str, java.lang.String abbrev, FileInfoBase.UnitType type)
-
Unit
private Unit(int legacyNum, java.lang.String str, java.lang.String abbrev, FileInfoBase.UnitType type, double convFactor)
-
-
Method Detail
-
values
public static FileInfoBase.Unit[] 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 (FileInfoBase.Unit c : FileInfoBase.Unit.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static FileInfoBase.Unit 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 namejava.lang.NullPointerException- if the argument is null
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Enum<FileInfoBase.Unit>
-
getAbbrev
public java.lang.String getAbbrev()
-
getType
public FileInfoBase.UnitType getType()
-
getConvFactor
public double getConvFactor()
-
getLegacyNum
public int getLegacyNum()
-
convertTo
public double convertTo(double origValue, FileInfoBase.Unit resultUnit)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
public double convertFrom(double origValue, FileInfoBase.Unit origUnit)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
public double getConversionFactor(FileInfoBase.Unit resultUnit)
-
getUnit
public static FileInfoBase.Unit getUnit(java.lang.String str)
-
getUnitFromAbbrev
public static FileInfoBase.Unit getUnitFromAbbrev(java.lang.String abbrev)
-
getUnitFromLegacyNum
public static FileInfoBase.Unit getUnitFromLegacyNum(int legacyNum)
-
-