Skip to content

Commit

Permalink
59: Add missing UCUM units
Browse files Browse the repository at this point in the history
Task-Url: #59
  • Loading branch information
keilw committed Sep 6, 2020
1 parent 50620aa commit 80e63d5
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions ucum/src/main/java/systems/uom/ucum/UCUM.java
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,8 @@ public static UCUM getInstance() {
* with the existing SI units. In UCUM, the ampere is defined as
* <code>COULOMB.divide(SECOND)</code>.
*/
public static final Unit<ElectricCurrent> AMPERE = addUnit(Units.AMPERE);
// public static final Unit<MagnetomotiveForce> AMPERE_TURN =
// addUnit(Units.AMPERE_TURN);
public static final Unit<ElectricCurrent> AMPERE = addUnit(Units.AMPERE, "Ampère", "A");

/**
* We deviate slightly from the standard here, to maintain compatibility
* with the existing SI units. In UCUM, the volt is defined as
Expand Down Expand Up @@ -975,7 +974,7 @@ private static <U extends Unit<?>> U addUnit(U unit, String name, String text, b
if (isLabel) {
SimpleUnitFormat.getInstance().label(unit, text);
}
if (name != null && unit instanceof AbstractUnit) {
if (name != null && unit instanceof ComparableUnit) {
return Helper.addUnit(INSTANCE.units, unit, name);
} else {
INSTANCE.units.add(unit);
Expand Down

0 comments on commit 80e63d5

Please sign in to comment.