summaryrefslogtreecommitdiff
path: root/src/main/java/sevenUnitsGUI/ViewBot.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/sevenUnitsGUI/ViewBot.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/sevenUnitsGUI/ViewBot.java')
-rw-r--r--src/main/java/sevenUnitsGUI/ViewBot.java30
1 files changed, 29 insertions, 1 deletions
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<String> 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<String> 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<String> 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));
}