summaryrefslogtreecommitdiff
path: root/src/main/java/sevenUnits/unit/UnitValue.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/sevenUnits/unit/UnitValue.java')
-rw-r--r--src/main/java/sevenUnits/unit/UnitValue.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/main/java/sevenUnits/unit/UnitValue.java b/src/main/java/sevenUnits/unit/UnitValue.java
index 9b485e3..aee836e 100644
--- a/src/main/java/sevenUnits/unit/UnitValue.java
+++ b/src/main/java/sevenUnits/unit/UnitValue.java
@@ -56,6 +56,7 @@ public final class UnitValue {
}
/**
+ * @param other unit to try to convert to
* @return true if this value can be converted to {@code other}.
* @since 2020-10-01
*/
@@ -76,11 +77,12 @@ public final class UnitValue {
}
/**
- * Returns this unit value represented as a {@code LinearUnitValue} with this
+ * Returns this unit value represented as a {@link LinearUnitValue} with this
* unit's base unit as the base.
*
* @param ns name and symbol for the base unit, use NameSymbol.EMPTY if not
* needed.
+ * @return this unit as a {@link LinearUnitValue}
* @since 2020-09-29
*/
public final LinearUnitValue convertToBase(NameSymbol ns) {
@@ -89,13 +91,14 @@ public final class UnitValue {
}
/**
+ * @param newUnit unit to use for this value
* @return a {@code LinearUnitValue} that is equivalent to this value. It
* will have zero uncertainty.
* @since 2020-09-29
*/
- public final LinearUnitValue convertToLinear(LinearUnit other) {
- return LinearUnitValue.getExact(other,
- this.getUnit().convertTo(other, this.getValue()));
+ public final LinearUnitValue convertToLinear(LinearUnit newUnit) {
+ return LinearUnitValue.getExact(newUnit,
+ this.getUnit().convertTo(newUnit, this.getValue()));
}
/**