com.here.msdkui.common.measurements

## Class Measurement

- java.lang.Object
- - com.here.msdkui.common.measurements.Measurement

-     public class Measurement
      extends java.lang.Object

  A class representing measurement of given quantity.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Measurement(double value, MeasurementUnit unit)` Constructs a new instance using given value and unit.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `convert(MeasurementUnit to)` Converts a current value to the given unit.
    `Measurement` | `getConverted(MeasurementUnit to)` Returns a new instance of `Measurement` holding the converted value.
    `MeasurementUnit` | `getUnit()` Returns a current unit.
    `double` | `getValue()` Returns a current value.

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

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

- - ### Constructor Detail

    - #### Measurement

          public Measurement(double value,
                             MeasurementUnit unit)

      Constructs a new instance using given value and unit.
      Parameters:
        `value` - a measured value.
        `unit` - a `MeasurementUnit` for value.

  - ### Method Detail

    - #### getValue

          public double getValue()

      Returns a current value.
      Returns:
        measurement value.

    - #### getUnit

          public MeasurementUnit getUnit()

      Returns a current unit.
      Returns:
        a `MeasurementUnit`

    - #### convert

          public boolean convert(MeasurementUnit to)

      Converts a current value to the given unit.
      Parameters:
        `to` - a `MeasurementUnit` current value should be converted to.
      Returns:
        true if conversion was successful.

    - #### getConverted

          public Measurement getConverted(MeasurementUnit to)

      Returns a new instance of `Measurement` holding the converted value.
      Parameters:
        `to` - a `MeasurementUnit` current value should be converted to.
      Returns:
        an instance of `Measurement`.