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 class
FileInfoBase.Unit.UnsupportedUnitConversion
-
Enum Constant Summary
Enum Constants Enum Constant Description ANGSTROMS
Unit of measurement angstroms.CENTIMETERS
Unit of measurement centimeters.DEGREES
DegreesHOURS
Unit of measurement hours.HZ
Unit of measurement hertz.INCHES
Unit of measurement inches.KILOMETERS
Unit of measurement kilometers.METERS
Unit of measurement meters.METERS_PER_SEC
Meters per secondMICROMETERS
Unit of measurement micrometers.MICROSEC
Unit of measurement microseconds.MILES
Unit of measurement miles.MILLIMETERS
Unit of measurement millimeters.MILLISEC
Unit of measurement milliseconds.MILS
Units of measurement mil (thousandth of an inch)MINUTES
Unit of measurement minutes.NANOMETERS
Unit of measurement nanometers.NANOSEC
Unit of measurement nanoseconds.PPM
Unit of measurement part-per-million.RADS
Radians per second.SECONDS
Unit of measurement seconds.UNKNOWN_MEASURE
Unit of measurement unknown.
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
abbrev
private double
convFactor
private int
legacyNum
private java.lang.String
str
private FileInfoBase.UnitType
type
-
Constructor Summary
Constructors Modifier Constructor Description private
Unit(int legacyNum, java.lang.String str, java.lang.String abbrev, FileInfoBase.UnitType type)
private
Unit(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 double
convertFrom(double origValue, FileInfoBase.Unit origUnit)
Method converts theorigValue
that is currently in units oforigUnit
to the units specified bythis
unit.double
convertTo(double origValue, FileInfoBase.Unit resultUnit)
Method converts theorigValue
quantity from the current units to theresultUnit
.java.lang.String
getAbbrev()
double
getConversionFactor(FileInfoBase.Unit resultUnit)
double
getConvFactor()
int
getLegacyNum()
FileInfoBase.UnitType
getType()
static FileInfoBase.Unit
getUnit(java.lang.String str)
static FileInfoBase.Unit
getUnitFromAbbrev(java.lang.String abbrev)
static FileInfoBase.Unit
getUnitFromLegacyNum(int legacyNum)
java.lang.String
toString()
static FileInfoBase.Unit
valueOf(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:
toString
in 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 theorigValue
quantity from the current units to theresultUnit
.- Parameters:
origValue
- A value in units ofthis
resultUnit
- The units to convert to- Returns:
- The converted quantity
-
convertFrom
public double convertFrom(double origValue, FileInfoBase.Unit origUnit)
Method converts theorigValue
that is currently in units oforigUnit
to the units specified bythis
unit.- Parameters:
origValue
- A value in units oforigUnit
origUnit
- 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)
-
-