public enum PressureUnit extends java.lang.Enum<PressureUnit> implements EnumWithImageName, UnitEnum<PressureUnit>
Enum Constant and Description |
---|
HPa
Pressure in hectopascals (also known as millibars).
|
inHg
Pressure in inches of mercury.
|
KPa
Pressure in kilopascals (also known as 10's of millibars).
|
mmHg
Pressure in millimeters of mercury.
|
Pa
Pressure in pascals.
|
PSI
Pressure in pounds per square inch.
|
Modifier and Type | Method and Description |
---|---|
float |
from(PressureUnit other)
Get the multiplicative conversion factor to convert a pressure from the specified
units to this unit.
|
int |
getDigitsAfterDecimalPoint()
Get the number of digits after the decimal point for displaying in these units.
|
java.lang.String |
getImagePath()
Return the relative path name of the image file for this enum value.
|
float |
getOffset(PressureUnit other)
Get the additive offset to convert a value from the specified unit to this unit.
|
java.lang.String |
unitString()
Get the string to use when displaying values of this unit.
|
static PressureUnit |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static PressureUnit[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final PressureUnit Pa
public static final PressureUnit HPa
public static final PressureUnit KPa
public static final PressureUnit mmHg
public static final PressureUnit PSI
public static final PressureUnit inHg
public static PressureUnit[] values()
for (PressureUnit c : PressureUnit.values()) System.out.println(c);
public static PressureUnit 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 final float from(PressureUnit other)
from
in interface UnitEnum<PressureUnit>
other
- another PressureUnit representing the existing units of a pressure valuepublic float getOffset(PressureUnit other)
getOffset
in interface UnitEnum<PressureUnit>
other
- another PressureUnit representing the existing units of a valuepublic final int getDigitsAfterDecimalPoint()
public final java.lang.String unitString()
public java.lang.String getImagePath()
getImagePath
in interface EnumWithImageName