Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD

## org.ka2ddo.util
Enum PressureUnit

    java.lang.Object
      java.lang.Enum<PressureUnit>
          org.ka2ddo.util.PressureUnit

All Implemented Interfaces:
  java.io.Serializable, java.lang.Comparable<PressureUnit>, EnumWithImageName, UnitEnum<PressureUnit>

    public enum PressureUnit

extends java.lang.Enum<PressureUnit>
implements EnumWithImageName, UnitEnum<PressureUnit>

Enumeration of supported units of atmospheric pressure. All scaling factors are in units relative to the Peet Bros weather station standard resolution of 0.1 millibars.

Enum Constant Summary
`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.

Method Summary
`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.

Methods inherited from class java.lang.Enum
`clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

Methods inherited from class java.lang.Object
`getClass, notify, notifyAll, wait, wait, wait`

Enum Constant Detail

### Pa

    public static final PressureUnit Pa

  Pressure in pascals.

### HPa

    public static final PressureUnit HPa

  Pressure in hectopascals (also known as millibars).

### KPa

    public static final PressureUnit KPa

  Pressure in kilopascals (also known as 10's of millibars).

### mmHg

    public static final PressureUnit mmHg

  Pressure in millimeters of mercury.

### PSI

    public static final PressureUnit PSI

  Pressure in pounds per square inch.

### inHg

    public static final PressureUnit inHg

  Pressure in inches of mercury.

Method Detail

### values

    public static PressureUnit[] 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 (PressureUnit c : PressureUnit.values())
          System.out.println(c);

  Returns:
    an array containing the constants of this enum type, in the order they are declared

### valueOf

    public static PressureUnit 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 name
    `java.lang.NullPointerException` - if the argument is null

### from

    public final float from(PressureUnit other)

  Get the multiplicative conversion factor to convert a pressure from the specified units to this unit.

  Specified by:
    `from` in interface `UnitEnum<PressureUnit>`
  Parameters:
    `other` - another PressureUnit representing the existing units of a pressure value
  Returns:
    the conversion factor to change a pressure value into this unit

### getOffset

    public float getOffset(PressureUnit other)

  Get the additive offset to convert a value from the specified unit to this unit.

  Specified by:
    `getOffset` in interface `UnitEnum<PressureUnit>`
  Parameters:
    `other` - another PressureUnit representing the existing units of a value
  Returns:
    the offset (after multiplying by the from() factor) to add to get the value in this unit

### getDigitsAfterDecimalPoint

    public final int getDigitsAfterDecimalPoint()

  Get the number of digits after the decimal point for displaying in these units.

  Returns:
    digits to display after decimal point

### unitString

    public final java.lang.String unitString()

  Get the string to use when displaying values of this unit.

  Returns:
    suffix display String

### getImagePath

    public java.lang.String getImagePath()

  Return the relative path name of the image file for this enum value.

  Specified by:
    `getImagePath` in interface `EnumWithImageName`
  Returns:
    path name String

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD