From 25f972d198e50ad5a54fa175ec39887f02c33fdc Mon Sep 17 00:00:00 2001 From: Adrien Hopkins Date: Wed, 4 Jun 2025 18:39:03 -0500 Subject: Remove most comment warnings In some cases I've used @SuppressWarnings, which Gradle doesn't seem to respect, but I've solved all the other ones. --- src/main/java/sevenUnits/unit/UnitDatabase.java | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'src/main/java/sevenUnits/unit/UnitDatabase.java') diff --git a/src/main/java/sevenUnits/unit/UnitDatabase.java b/src/main/java/sevenUnits/unit/UnitDatabase.java index 444b366..95e953f 100644 --- a/src/main/java/sevenUnits/unit/UnitDatabase.java +++ b/src/main/java/sevenUnits/unit/UnitDatabase.java @@ -212,6 +212,8 @@ public final class UnitDatabase { * Creates the * {@code UnitsDatabase.PrefixedUnitMap.PrefixedUnitNameSet.PrefixedUnitNameIterator}. * + * @param map map to base iterator on + * * @since 2019-04-14 * @since v0.2.0 */ @@ -527,6 +529,8 @@ public final class UnitDatabase { * Creates the * {@code UnitsDatabase.PrefixedUnitMap.PrefixedUnitNameSet.PrefixedUnitNameIterator}. * + * @param map map to base itorator on + * * @since 2019-04-14 * @since v0.2.0 */ @@ -1529,6 +1533,9 @@ public final class UnitDatabase { /** * Returns true iff there is a unit set with this name. + * + * @param name name to check for + * @return true iff there is a unit set with this name * * @since 2024-08-16 */ @@ -1574,7 +1581,7 @@ public final class UnitDatabase { // the previous operation breaks negative numbers, fix them! // (i.e. -2 becomes - 2) - // FIXME the previous operaton also breaks stuff like "1e-5" + // FIXME the previous operation also breaks stuff like "1e-5" for (int i = 0; i < modifiedExpression.length(); i++) { if (modifiedExpression.charAt(i) == '-' && (i < 2 || Arrays.asList('+', '-', '*', '/', '|', '^') @@ -1620,6 +1627,7 @@ public final class UnitDatabase { * * * @param expression expression to parse + * @return parsed unit dimension * @throws IllegalArgumentException if the expression cannot be parsed * @throws NullPointerException if expression is null * @since 2019-04-13 @@ -1848,6 +1856,7 @@ public final class UnitDatabase { * This method only works with linear units. * * @param expression expression to parse + * @return parsed unit * @throws IllegalArgumentException if the expression cannot be parsed * @throws NullPointerException if expression is null * @since 2019-01-07 @@ -1890,6 +1899,9 @@ public final class UnitDatabase { /** * Get a unit set from its name, throwing a {@link NoSuchElementException} if * there is none. + * + * @param name name of unit set + * @return unit set with that name * * @since 2024-08-16 */ @@ -1977,6 +1989,7 @@ public final class UnitDatabase { * {@link #loadDimensionFile}. * * @param stream stream to load from + * @return list of all errors that happened loading the stream * @since 2021-03-27 */ public List loadDimensionsFromStream( @@ -2047,6 +2060,7 @@ public final class UnitDatabase { * {@link #loadUnitsFile}. * * @param stream stream to load from + * @return list of all errors that happened loading the stream * @since 2021-03-27 */ public List loadUnitsFromStream(InputStream stream) { -- cgit v1.2.3