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/BaseUnit.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/main/java/sevenUnits/unit/BaseUnit.java') diff --git a/src/main/java/sevenUnits/unit/BaseUnit.java b/src/main/java/sevenUnits/unit/BaseUnit.java index dba7f52..fe85a7b 100644 --- a/src/main/java/sevenUnits/unit/BaseUnit.java +++ b/src/main/java/sevenUnits/unit/BaseUnit.java @@ -46,7 +46,7 @@ public final class BaseUnit extends Unit { final String name, final String symbol) { return new BaseUnit(dimension, name, symbol, new HashSet<>()); } - + /** * Gets a base unit from the dimension it measures, its name and its symbol. * @@ -60,12 +60,12 @@ public final class BaseUnit extends Unit { final String name, final String symbol, final Set otherNames) { return new BaseUnit(dimension, name, symbol, otherNames); } - + /** * The dimension measured by this base unit. */ private final BaseDimension dimension; - + /** * Creates the {@code BaseUnit}. * @@ -81,7 +81,7 @@ public final class BaseUnit extends Unit { this.dimension = Objects.requireNonNull(dimension, "dimension must not be null."); } - + /** * Returns a {@code LinearUnit} with this unit as a base and a conversion * factor of 1. This operation must be done in order to allow units to be @@ -93,17 +93,17 @@ public final class BaseUnit extends Unit { public LinearUnit asLinearUnit() { return LinearUnit.valueOf(this.getBase(), 1); } - + @Override protected double convertFromBase(final double value) { return value; } - + @Override protected double convertToBase(final double value) { return value; } - + /** * @return dimension * @since 2019-10-16 @@ -111,7 +111,7 @@ public final class BaseUnit extends Unit { public final BaseDimension getBaseDimension() { return this.dimension; } - + @Override public String toString() { return this.getPrimaryName().orElse("Unnamed unit") @@ -119,7 +119,7 @@ public final class BaseUnit extends Unit { ? String.format(" (%s)", this.getSymbol().get()) : ""); } - + @Override public BaseUnit withName(final NameSymbol ns) { Objects.requireNonNull(ns, "ns must not be null."); -- cgit v1.2.3