summaryrefslogtreecommitdiff
path: root/src/main/java/sevenUnitsGUI/ViewBot.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/sevenUnitsGUI/ViewBot.java')
-rw-r--r--src/main/java/sevenUnitsGUI/ViewBot.java23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/main/java/sevenUnitsGUI/ViewBot.java b/src/main/java/sevenUnitsGUI/ViewBot.java
index dd9869d..9253ae5 100644
--- a/src/main/java/sevenUnitsGUI/ViewBot.java
+++ b/src/main/java/sevenUnitsGUI/ViewBot.java
@@ -196,30 +196,30 @@ final class ViewBot implements UnitConversionView, ExpressionConversionView {
private final Presenter presenter;
/** The dimensions available to select from */
- private Set<String> dimensionNames;
+ private Set<String> dimensionNames = Set.of();
/** The expression in the From field */
- private String fromExpression;
+ private String fromExpression = "";
/** The expression in the To field */
- private String toExpression;
+ private String toExpression = "";
/**
* The user-provided string representing the value in {@code fromSelection}
*/
- private String inputValue;
+ private String inputValue = "";
/** The unit selected in the From selection */
- private Optional<String> fromSelection;
+ private Optional<String> fromSelection = Optional.empty();
/** The unit selected in the To selection */
- private Optional<String> toSelection;
+ private Optional<String> toSelection = Optional.empty();
/** The currently selected dimension */
- private Optional<String> selectedDimensionName;
+ private Optional<String> selectedDimensionName = Optional.empty();
/** The units available in the From selection */
- private Set<String> fromUnits;
+ private Set<String> fromUnits = Set.of();
/** The units available in the To selection */
- private Set<String> toUnits;
+ private Set<String> toUnits = Set.of();
/** The selected unit in the unit viewer */
- private Optional<String> unitViewerSelection;
+ private Optional<String> unitViewerSelection = Optional.empty();
/** The selected unit in the prefix viewer */
- private Optional<String> prefixViewerSelection;
+ private Optional<String> prefixViewerSelection = Optional.empty();
/** Saved outputs of all unit conversions */
private final List<UnitConversionRecord> unitConversions;
@@ -289,6 +289,7 @@ final class ViewBot implements UnitConversionView, ExpressionConversionView {
* @return the presenter associated with tihs view
* @since 2022-01-29
*/
+ @Override
public Presenter getPresenter() {
return this.presenter;
}