summaryrefslogtreecommitdiff
path: root/src/main/java/sevenUnits/unit/Unit.java
diff options
context:
space:
mode:
authorAdrien Hopkins <ahopk127@my.yorku.ca>2021-08-26 07:52:45 -0500
committerAdrien Hopkins <ahopk127@my.yorku.ca>2021-08-26 08:04:32 -0500
commit1cb69cfdcb18bbafdbc792174697732e7cf359e7 (patch)
tree01db8e4ac3ee6d46b2f2e60ae07fc94425e55787 /src/main/java/sevenUnits/unit/Unit.java
parent2d6b85fb9e56b4afa7fd2f3cc26518d5d3125c2c (diff)
Added units and dimensions to the design document
Diffstat (limited to 'src/main/java/sevenUnits/unit/Unit.java')
-rw-r--r--src/main/java/sevenUnits/unit/Unit.java12
1 files changed, 6 insertions, 6 deletions
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<BaseUnit> unitBase, NameSymbol ns) {
+ protected Unit(ObjectProduct<BaseUnit> 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 <b>base</b> unit
* @return value expressed in <b>this</b> 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 <W> 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 <b>this</b> unit
* @return value expressed in <b>base</b> 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;
}