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/sevenUnitsGUI/ViewBot.java | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) (limited to 'src/main/java/sevenUnitsGUI/ViewBot.java') diff --git a/src/main/java/sevenUnitsGUI/ViewBot.java b/src/main/java/sevenUnitsGUI/ViewBot.java index aea30bb..60a8d7b 100644 --- a/src/main/java/sevenUnitsGUI/ViewBot.java +++ b/src/main/java/sevenUnitsGUI/ViewBot.java @@ -79,10 +79,12 @@ public final class ViewBot return Objects.hash(this.multiplierString, this.nameSymbol); } + /** @return A string representation of the prefix multiplier. */ public String multiplierString() { return this.multiplierString; } + /** @return A {@code NameSymbol} describing the prefix. */ public NameSymbol nameSymbol() { return this.nameSymbol; } @@ -112,6 +114,10 @@ public final class ViewBot private final UnitType unitType; /** + * @param nameSymbol name(s) and symbol of unit + * @param definition unit's definition string + * @param dimensionName name of unit's dimension + * @param unitType type of unit (metric/semi-metric/non-metric) * @since 2022-04-16 */ public UnitViewingRecord(NameSymbol nameSymbol, String definition, @@ -166,6 +172,7 @@ public final class ViewBot this.nameSymbol, this.unitType); } + /** @return name(s) and symbol of unit */ public NameSymbol nameSymbol() { return this.nameSymbol; } @@ -395,6 +402,10 @@ public final class ViewBot this.selectedDimensionName = selectedDimensionName; } + /** + * Sets the view's selected dimension + * @param selectedDimensionName name of dimension to select (string) + */ public void setSelectedDimensionName(String selectedDimensionName) { this.setSelectedDimensionName(Optional.of(selectedDimensionName)); } @@ -412,7 +423,7 @@ public final class ViewBot } /** - * @param toSelection the toSelection to set + * @param toSelection unit set in the 'To' selection * @since 2022-01-29 */ public void setToSelection(Optional toSelection) { @@ -420,6 +431,9 @@ public final class ViewBot "toSelection cannot be null."); } + /** + * @param toSelection unit set in the 'To' selection + */ public void setToSelection(String toSelection) { this.setToSelection(Optional.of(toSelection)); } @@ -439,18 +453,32 @@ public final class ViewBot // do nothing, ViewBot supports selecting any unit } + /** + * @param viewedPrefixName name of prefix being used + */ public void setViewedPrefixName(Optional viewedPrefixName) { this.prefixViewerSelection = viewedPrefixName; } + /** + * @param viewedPrefixName name of prefix being used (may not be null) + * @throws NullPointerException if {@code viewedPrefixName} is null + */ public void setViewedPrefixName(String viewedPrefixName) { this.setViewedPrefixName(Optional.of(viewedPrefixName)); } + /** + * @param viewedUnitName name of unit being used + */ public void setViewedUnitName(Optional viewedUnitName) { this.unitViewerSelection = viewedUnitName; } + /** + * @param viewedUnitName name of unit being used (may not be null) + * @throws NullPointerException if {@code viewedUnitName} is null + */ public void setViewedUnitName(String viewedUnitName) { this.setViewedUnitName(Optional.of(viewedUnitName)); } -- cgit v1.2.3