com.pdfunit

## Enum FormatUnit

- java.lang.Object
- - java.lang.Enum<FormatUnit>
  - - com.pdfunit.FormatUnit

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<FormatUnit>

      @DoNotObfuscate
      public enum FormatUnit
      extends java.lang.Enum<FormatUnit>

  Enumeration containing units and functions to convert between them. The internal reference is points.
  Since:
    2016.05
  Author:
    Carsten Siedentop, January 2016
  See Also:
    `DocumentFormatMillis`

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `MILLIMETER` Deprecated.
    `MILLIMETERS`
    `POINTS`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `double` | `getMillisPerUnit()` Returns the conversion factor from the current unit to millimeter.
    `double` | `getPointsPerUnit()` Returns the conversion factor from the current unit to points.
    `java.lang.String` | `toString()` This method can be used for logging and debugging.
    `static FormatUnit` | `valueOf(java.lang.String name)` Returns the enum constant of this type with the specified name.
    `static FormatUnit[]` | `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, valueOf`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### MILLIMETER

          @Deprecated
          public static final FormatUnit MILLIMETER

      Deprecated.
      Measurement unit. One millimeter is converted to points by using 72 DPI (dots per inch).

      The value is marked as deprecated. Use the plural instead.

    - #### MILLIMETERS

          public static final FormatUnit MILLIMETERS

    - #### POINTS

          public static final FormatUnit POINTS

  - ### Method Detail

    - #### values

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

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

    - #### valueOf

          public static FormatUnit 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

    - #### getMillisPerUnit

          public double getMillisPerUnit()

      Returns the conversion factor from the current unit to millimeter.

    - #### getPointsPerUnit

          public double getPointsPerUnit()

      Returns the conversion factor from the current unit to points.

    - #### toString

          public java.lang.String toString()

      This method can be used for logging and debugging.
      Overrides:
        `toString` in class `java.lang.Enum<FormatUnit>`

Copyright (C) PDFUnit.com. See here for license.