org.freeplane.api

## Class Quantity<U extends java.lang.Enum<U> & PhysicalUnit>

- java.lang.Object
- - org.freeplane.api.Quantity<U>

-     public class Quantity<U extends java.lang.Enum<U> & PhysicalUnit>
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `U` | `unit`
    `double` | `value`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Quantity(double value, U unit)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Quantity<U>` | `add(double value, U unit)`
    `Quantity<U>` | `add(Quantity<U> second)`
    `void` | `assertNonNegative()`
    `static <U extends java.lang.Enum<U> & PhysicalUnit> void` | `assertNonNegativeOrNull(Quantity<U> quantity)`
    `boolean` | `equals(java.lang.Object obj)`
    `static <U extends java.lang.Enum<U> & PhysicalUnit> Quantity<U>` | `fromString(java.lang.String valueString, U defaultUnit)`
    `int` | `hashCode()`
    `Quantity<U>` | `in(U unit)`
    `double` | `toBaseUnits()`
    `int` | `toBaseUnitsRounded()`
    `java.lang.String` | `toString()`
    `Quantity<U>` | `zoomBy(double zoom)`

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### value

          public final double value

    - #### unit

          public final U extends java.lang.Enum<U> & PhysicalUnit unit

  - ### Constructor Detail

    - #### Quantity

          public Quantity(double value,
                          U unit)

  - ### Method Detail

    - #### fromString

          public static <U extends java.lang.Enum<U> & PhysicalUnit> Quantity<U> fromString(java.lang.String valueString,
                                                                                            U defaultUnit)

    - #### toBaseUnits

          public double toBaseUnits()

    - #### toBaseUnitsRounded

          public int toBaseUnitsRounded()

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### equals

          public boolean equals(java.lang.Object obj)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### in

          public Quantity<U> in(U unit)

    - #### assertNonNegative

          public void assertNonNegative()

    - #### assertNonNegativeOrNull

          public static <U extends java.lang.Enum<U> & PhysicalUnit> void assertNonNegativeOrNull(Quantity<U> quantity)

    - #### add

          public Quantity<U> add(Quantity<U> second)

    - #### add

          public Quantity<U> add(double value,
                                 U unit)

    - #### zoomBy

          public Quantity<U> zoomBy(double zoom)