diff --git a/bundles/org.openhab.core.automation/src/main/java/org/openhab/core/automation/type/Input.java b/bundles/org.openhab.core.automation/src/main/java/org/openhab/core/automation/type/Input.java index 273f9343460..66856788342 100644 --- a/bundles/org.openhab.core.automation/src/main/java/org/openhab/core/automation/type/Input.java +++ b/bundles/org.openhab.core.automation/src/main/java/org/openhab/core/automation/type/Input.java @@ -14,6 +14,8 @@ import java.util.Set; +import org.eclipse.jdt.annotation.NonNullByDefault; +import org.eclipse.jdt.annotation.Nullable; import org.openhab.core.automation.Module; import org.openhab.core.automation.Rule; @@ -32,20 +34,26 @@ * "temperature", for example. The value "*" means that all possible types are acceptable. The type is used to determine * which {@link Output} can be connected to this {@link Input}. *
* By setting the step size to 0
, any granularity is allowed, i.e. any number of decimals is accepted.
*
- * @return the value granularity for a numeric value (nullable)
+ * @return the value granularity for a numeric value
*/
- public BigDecimal getStepSize() {
+ public @Nullable BigDecimal getStepSize() {
return step;
}
/**
- * @return the regular expression for a text type (nullable)
+ * @return the regular expression for a text type
*/
- public String getPattern() {
+ public @Nullable String getPattern() {
return pattern;
}
/**
* @return true if the value is required, otherwise false.
*/
- public Boolean isReadOnly() {
+ public boolean isReadOnly() {
return readOnly;
}
@@ -293,14 +296,14 @@ public Boolean isReadOnly() {
* @return true if multiple selections of options are allowed, otherwise
* false.
*/
- public Boolean isMultiple() {
+ public boolean isMultiple() {
return multiple;
}
/**
* @return the maximum number of options that can be selected from the options list
*/
- public Integer getMultipleLimit() {
+ public @Nullable Integer getMultipleLimit() {
return multipleLimit;
}
@@ -347,10 +350,9 @@ public Integer getMultipleLimit() {
* - location: A latitude,longitude[,altitude] GPS location. A user-interface would probably render a world map for
* selection.
*
- * @return the context of the configuration parameter (could be null or
- * empty)
+ * @return the context of the configuration parameter (could be empty)
*/
- public String getContext() {
+ public @Nullable String getContext() {
return this.context;
}
@@ -362,35 +364,34 @@ public String getContext() {
* false
*/
public boolean isRequired() {
- return this.required;
+ return required;
}
/**
* Returns the default value of the configuration parameter.
*
- * @return the default value of the configuration parameter (could be null)
+ * @return the default value of the configuration parameter
*/
- public String getDefault() {
- return this.defaultValue;
+ public @Nullable String getDefault() {
+ return defaultValue;
}
/**
- * Returns a human readable label for the configuration parameter.
+ * Returns a human-readable label for the configuration parameter.
*
- * @return a human readable label for the configuration parameter (could be
- * null or empty)
+ * @return a human-readable label for the configuration parameter (could be empty)
*/
- public String getLabel() {
- return this.label;
+ public @Nullable String getLabel() {
+ return label;
}
/**
- * Returns a the group for this configuration parameter.
+ * Returns the group for this configuration parameter.
*
- * @return a group for the configuration parameter (could be null or empty)
+ * @return a group for the configuration parameter (could be empty)
*/
- public String getGroupName() {
- return this.groupName;
+ public @Nullable String getGroupName() {
+ return groupName;
}
/**
@@ -400,7 +401,7 @@ public String getGroupName() {
* @return true if the value is limited to the options list
*/
public boolean getLimitToOptions() {
- return this.limitToOptions;
+ return limitToOptions;
}
/**
@@ -409,17 +410,16 @@ public boolean getLimitToOptions() {
* @return true if the value is an advanced option
*/
public boolean isAdvanced() {
- return this.advanced;
+ return advanced;
}
/**
- * Returns a human readable description for the configuration parameter.
+ * Returns a human-readable description for the configuration parameter.
*
- * @return a human readable description for the configuration parameter
- * (could be null or empty)
+ * @return a human-readable description for the configuration parameter (could be empty)
*/
- public String getDescription() {
- return this.description;
+ public @Nullable String getDescription() {
+ return description;
}
/**
@@ -428,7 +428,7 @@ public String getDescription() {
* @return static selection list for the value of this parameter
*/
public List