From 26291e672b0e683edc9d57710a9a9d96ca199c45 Mon Sep 17 00:00:00 2001 From: Adrien Hopkins Date: Sun, 24 Mar 2024 13:14:11 -0500 Subject: Format source code & set explicit UTF-8 --- src/main/java/sevenUnits/unit/UnitlikeValue.java | 26 ++++++++++++------------ 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'src/main/java/sevenUnits/unit/UnitlikeValue.java') diff --git a/src/main/java/sevenUnits/unit/UnitlikeValue.java b/src/main/java/sevenUnits/unit/UnitlikeValue.java index 26354b1..ad0d1ea 100644 --- a/src/main/java/sevenUnits/unit/UnitlikeValue.java +++ b/src/main/java/sevenUnits/unit/UnitlikeValue.java @@ -34,10 +34,10 @@ final class UnitlikeValue, V> { V value) { return new UnitlikeValue<>(unitlike, value); } - + private final T unitlike; private final V value; - + /** * @param unitlike * @param value @@ -47,7 +47,7 @@ final class UnitlikeValue, V> { this.unitlike = unitlike; this.value = value; } - + /** * @return true if this value can be converted to {@code other}. * @since 2020-10-01 @@ -55,7 +55,7 @@ final class UnitlikeValue, V> { public final boolean canConvertTo(Unit other) { return this.unitlike.canConvertTo(other); } - + /** * @return true if this value can be converted to {@code other}. * @since 2020-10-01 @@ -63,7 +63,7 @@ final class UnitlikeValue, V> { public final boolean canConvertTo(Unitlike other) { return this.unitlike.canConvertTo(other); } - + /** * Returns a UnitlikeValue that represents the same value expressed in a * different unitlike form. @@ -76,7 +76,7 @@ final class UnitlikeValue, V> { return UnitlikeValue.of(other, this.unitlike.convertTo(other, this.getValue())); } - + /** * Returns a UnitValue that represents the same value expressed in a * different unit @@ -88,7 +88,7 @@ final class UnitlikeValue, V> { return UnitValue.of(other, this.unitlike.convertTo(other, this.getValue())); } - + /** * Returns this unit value represented as a {@code LinearUnitValue} with this * unit's base unit as the base. @@ -101,7 +101,7 @@ final class UnitlikeValue, V> { final LinearUnit base = LinearUnit.getBase(this.unitlike).withName(ns); return this.convertToLinear(base); } - + /** * @return a {@code LinearUnitValue} that is equivalent to this value. It * will have zero uncertainty. @@ -111,7 +111,7 @@ final class UnitlikeValue, V> { return LinearUnitValue.getExact(other, this.getUnitlike().convertTo(other, this.getValue())); } - + @Override public boolean equals(Object obj) { if (this == obj) @@ -131,7 +131,7 @@ final class UnitlikeValue, V> { return false; return true; } - + /** * @return the unitlike * @since 2020-09-29 @@ -139,7 +139,7 @@ final class UnitlikeValue, V> { public final Unitlike getUnitlike() { return this.unitlike; } - + /** * @return the value * @since 2020-09-29 @@ -147,7 +147,7 @@ final class UnitlikeValue, V> { public final V getValue() { return this.value; } - + @Override public int hashCode() { final int prime = 31; @@ -158,7 +158,7 @@ final class UnitlikeValue, V> { + (this.getValue() == null ? 0 : this.getValue().hashCode()); return result; } - + @Override public String toString() { final Optional primaryName = this.getUnitlike().getPrimaryName(); -- cgit v1.2.3