Package com.independentsoft.office

# Class Unit

java.lang.Object
com.independentsoft.office.Unit

public class Unit extends Object
The Class Unit.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Unit()`
  Instantiates a new unit.
  `Unit​(double val, UnitType type)`
  Instantiates a new unit.
  `Unit​(String value)`
  Instantiates a new unit.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Unit`
  `clone()`
  `UnitType`
  `getType()`
  Gets the type.
  `double`
  `getValue()`
  Gets the value.
  `void`
  `setType​(UnitType type)`
  Sets the type.
  `void`
  `setValue​(double value)`
  Sets the value.
  `long`
  `toEnglishMetricUnit()`
  To english metric unit.
  `String`
  `toString()`

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

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

- ## Constructor Details

  - ### Unit

    public Unit()
    Instantiates a new unit.

  - ### Unit

    public Unit​(double val, UnitType type)
    Instantiates a new unit.
    Parameters:
      `val` - the val
      `type` - the type

  - ### Unit

    public Unit​(String value)
    Instantiates a new unit.
    Parameters:
      `value` - the value

- ## Method Details

  - ### toEnglishMetricUnit

    public long toEnglishMetricUnit()
    To english metric unit.
    Returns:
      the long

  - ### clone

    public Unit clone()
    Overrides:
      `clone` in class `Object`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`

  - ### getValue

    public double getValue()
    Gets the value.
    Returns:
      the value

  - ### setValue

    public void setValue​(double value)
    Sets the value.
    Parameters:
      `value` - the new value

  - ### getType

    public UnitType getType()
    Gets the type.
    Returns:
      the type

  - ### setType

    public void setType​(UnitType type)
    Sets the type.
    Parameters:
      `type` - the new type