Package kiyut.sketsa.util

## Class UnitConversion

- java.lang.Object
- - kiyut.sketsa.util.UnitConversion

-     public class UnitConversion
      extends Object

  Utility class for translating Unit eg: in to mm or pc to cm
  Author:
    KIYUT

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static String` | `CM` |
    `static String` | `IN` |
    `static String` | `MM` |
    `static String` | `PC` |
    `static String` | `PT` |
    `static String` | `PX` |
    `protected static Map<String,​Double>` | `UNIT_MAP` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `UnitConversion()` |

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static double` | `convert​(double value, String srcUnit, String dstUnit, double dpi)` | Convert

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### PX

          public static final String PX

      See Also:
        Constant Field Values

    - #### MM

          public static final String MM

      See Also:
        Constant Field Values

    - #### CM

          public static final String CM

      See Also:
        Constant Field Values

    - #### IN

          public static final String IN

      See Also:
        Constant Field Values

    - #### PT

          public static final String PT

      See Also:
        Constant Field Values

    - #### PC

          public static final String PC

      See Also:
        Constant Field Values

    - #### UNIT_MAP

          protected static final Map<String,​Double> UNIT_MAP

  - ### Constructor Detail

    - #### UnitConversion

          public UnitConversion()

  - ### Method Detail

    - #### convert

          public static double convert​(double value,
                                       String srcUnit,
                                       String dstUnit,
                                       double dpi)

      Convert
      Parameters:
        `value` - Value to convert
        `srcUnit` - Source Unit
        `dstUnit` - Destination Unit
        `dpi` - Dot Per Inch
      Returns:
        the converted value