Class Unit

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

public class Unit extends Object
The Class Unit.
  • 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