summaryrefslogtreecommitdiffstats
path: root/node-admin
diff options
context:
space:
mode:
Diffstat (limited to 'node-admin')
-rw-r--r--node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/template/Form.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/template/Form.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/template/Form.java
index 0148a976251..6b38835e24f 100644
--- a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/template/Form.java
+++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/template/Form.java
@@ -30,13 +30,15 @@ public class Form {
void setParent(Form parent) { this.parent = parent; }
- /** Set the value of a variable expression, e.g. %{=color}. */
+ /** Set the value of a variable, e.g. %{=color}. */
public Form set(String name, String value) {
values.put(name, value);
return this;
}
+ /** Set the value of a variable and/or if-condition. */
public Form set(String name, boolean value) { return set(name, Boolean.toString(value)); }
+
public Form set(String name, int value) { return set(name, Integer.toString(value)); }
public Form set(String name, long value) { return set(name, Long.toString(value)); }
@@ -78,9 +80,7 @@ public class Form {
Optional<String> getVariableValue(String name) {
String value = values.get(name);
if (value != null) return Optional.of(value);
- if (parent != null) {
- return parent.getVariableValue(name);
- }
+ if (parent != null) return parent.getVariableValue(name);
return Optional.empty();
}
}