summaryrefslogtreecommitdiff
path: root/src/main/java/sevenUnits/unit/UnitDatabase.java
diff options
context:
space:
mode:
authorAdrien Hopkins <adrien.p.hopkins@gmail.com>2025-06-04 18:39:03 -0500
committerAdrien Hopkins <adrien.p.hopkins@gmail.com>2025-06-04 18:39:03 -0500
commit25f972d198e50ad5a54fa175ec39887f02c33fdc (patch)
tree2807b0ee27a5594f0dfcab421e6840c1270a8e6c /src/main/java/sevenUnits/unit/UnitDatabase.java
parentae0559a9432f85f9147eeb80b35f1b2947889acd (diff)
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.
Diffstat (limited to 'src/main/java/sevenUnits/unit/UnitDatabase.java')
-rw-r--r--src/main/java/sevenUnits/unit/UnitDatabase.java16
1 files changed, 15 insertions, 1 deletions
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 {
* </ul>
*
* @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<LoadingException> 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<LoadingException> loadUnitsFromStream(InputStream stream) {