/**
 * Copyright (c) 2014,2018 Contributors to the Eclipse Foundation
 *
 * See the NOTICE file(s) distributed with this work for additional
 * information regarding copyright ownership.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License 2.0 which is available at
 * http://www.eclipse.org/legal/epl-2.0
 *
 * SPDX-License-Identifier: EPL-2.0
 */
package org.eclipse.smarthome.core.i18n;

import java.awt.Dimension;

import javax.measure.Quantity;
import javax.measure.Unit;
import javax.measure.spi.SystemOfUnits;

import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;

/**
 * Provides {@link Unit}s and the current {@link MeasurementSystem}.
 *
 * @author Henning Treu - initial contribution
 *
 */
@NonNullByDefault
public interface UnitProvider {

    /**
     * Retrieves the default {@link Unit} for the given {@link Dimension} according to the current
     * {@link MeasurementSystem}.
     *
     * @param dimension The {@link Dimension} defines the base unit for the retrieved unit.
     * @return The {@link Unit} matching the given {@link Dimension}, {@code null} otherwise.
     */
    <T extends Quantity<T>> @Nullable Unit<T> getUnit(@Nullable Class<T> dimension);

    /**
     * Returns the {@link MeasurementSystem} which is currently set, must not be null.
     *
     * @return the {@link MeasurementSystem} which is currently set, must not be null.
     */
    SystemOfUnits getMeasurementSystem();

}

@@ -453,36 +453,8 @@
 n;%0A%0A
-import java.awt.Dimension;%0A%0A
 impo
@@ -698,33 +698,29 @@
  %7B@link 
-MeasurementSystem
+SystemOfUnits
 %7D.%0A *%0A *
@@ -893,25 +893,24 @@
  %7B@link 
-Dimension
+Quantity
 %7D accord
@@ -942,33 +942,29 @@
  %7B@link 
-MeasurementSystem
+SystemOfUnits
 %7D.%0A     
@@ -1000,25 +1000,43 @@
  %7B@link 
-D
+Quantity%7D, called d
 imension
 %7D define
@@ -1027,17 +1027,22 @@
 imension
-%7D
+ here,
  defines
@@ -1079,16 +1079,201 @@
 ed unit.
+ E.g.%0A     *            call %7B@code getUnit(javax.measure.quantity.Temperature.class)%7D to retrieve the temperature unit%0A     *            according to the current %7B@link SystemOfUnits%7D.
 %0A     * 
@@ -1327,17 +1327,16 @@
 ink 
-Dimension
+Quantity
 %7D, %7B
@@ -1486,33 +1486,29 @@
  %7B@link 
-MeasurementSystem
+SystemOfUnits
 %7D which 
@@ -1576,33 +1576,29 @@
  %7B@link 
-MeasurementSystem
+SystemOfUnits
 %7D which 

Fix JavaDoc for UnitProvider (#5555)