From 1cb69cfdcb18bbafdbc792174697732e7cf359e7 Mon Sep 17 00:00:00 2001 From: Adrien Hopkins Date: Thu, 26 Aug 2021 07:52:45 -0500 Subject: Added units and dimensions to the design document --- src/main/java/sevenUnits/unit/Unit.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/main/java/sevenUnits/unit/Unit.java') diff --git a/src/main/java/sevenUnits/unit/Unit.java b/src/main/java/sevenUnits/unit/Unit.java index 8fcacb8..58b4e10 100644 --- a/src/main/java/sevenUnits/unit/Unit.java +++ b/src/main/java/sevenUnits/unit/Unit.java @@ -117,7 +117,7 @@ public abstract class Unit implements Nameable { * @since 2019-10-16 * @throws NullPointerException if unitBase or ns is null */ - Unit(ObjectProduct unitBase, NameSymbol ns) { + protected Unit(ObjectProduct unitBase, NameSymbol ns) { this.unitBase = Objects.requireNonNull(unitBase, "unitBase may not be null"); this.nameSymbol = Objects.requireNonNull(ns, "ns may not be null"); @@ -192,7 +192,7 @@ public abstract class Unit implements Nameable { * * @implSpec This method is used by {@link #convertTo}, and its behaviour * affects the behaviour of {@code convertTo}. - * + * * @param value value expressed in base unit * @return value expressed in this unit * @since 2018-12-22 @@ -208,7 +208,7 @@ public abstract class Unit implements Nameable { * {@code other.convertFromBase(this.convertToBase(value))}. * Therefore, overriding either of those methods will change the * output of this method. - * + * * @param other unit to convert to * @param value value to convert * @return converted value @@ -235,7 +235,7 @@ public abstract class Unit implements Nameable { * {@code other.convertFromBase(this.convertToBase(value))}. * Therefore, overriding either of those methods will change the * output of this method. - * + * * @param other unitlike form to convert to * @param value value to convert * @param type of value to convert to @@ -270,7 +270,7 @@ public abstract class Unit implements Nameable { * * @implSpec This method is used by {@link #convertTo}, and its behaviour * affects the behaviour of {@code convertTo}. - * + * * @param value value expressed in this unit * @return value expressed in base unit * @since 2018-12-22 @@ -342,7 +342,7 @@ public abstract class Unit implements Nameable { // second condition - check that for (final BaseUnit b : linear.getBase().getBaseSet()) { - if (!SI.BaseUnits.BASE_UNITS.contains(b)) + if (!Metric.BaseUnits.BASE_UNITS.contains(b)) return false; } -- cgit v1.2.3