Package com.independentsoft.office.odf

# Class Size

java.lang.Object
com.independentsoft.office.odf.Size

public class Size extends Object
Represents a size.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Size()`
  Initializes a new instance of the Size class.
  `Size​(double size, Unit unit)`
  Initializes a new instance of the Size class.
  `Size​(String size)`
  Initializes a new instance of the Size class.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Size`
  `clone()`
  Creates a new object that is a deep copy of the current instance.
  `Unit`
  `getUnit()`
  Gets the size unit.
  `double`
  `getValue()`
  Gets the size value.
  `void`
  `setUnit​(Unit unit)`
  Sets the size unit.
  `void`
  `setValue​(double value)`
  Sets the size value.
  `String`
  `toString()`
  Converts the value of the current Size object to its equivalent string representation.

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

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

- ## Constructor Details

  - ### Size

    public Size()
    Initializes a new instance of the Size class.

  - ### Size

    public Size​(double size, Unit unit)
    Initializes a new instance of the Size class.
    Parameters:
      `size` - the size
      `unit` - the unit

  - ### Size

    public Size​(String size)
    Initializes a new instance of the Size class.
    Parameters:
      `size` - the size

- ## Method Details

  - ### clone

    public Size clone()
    Creates a new object that is a deep copy of the current instance.
    Overrides:
      `clone` in class `Object`
    Returns:
      A new object that is a copy of this instance.

  - ### toString

    public String toString()
    Converts the value of the current Size object to its equivalent string representation.
    Overrides:
      `toString` in class `Object`
    Returns:
      the string

  - ### getValue

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

  - ### setValue

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

  - ### getUnit

    public Unit getUnit()
    Gets the size unit.
    Returns:
      the unit

  - ### setUnit

    public void setUnit​(Unit unit)
    Sets the size unit.
    Parameters:
      `unit` - the new unit