Package org.openhab.core.sitemap
Interface Condition
@NonNullByDefault
public interface Condition
A representation of a sitemap rule condition.
- Author:
- Mark Herwege - Initial contribution
-
Method Summary
Modifier and TypeMethodDescription@Nullable StringGet the condition comparator.@Nullable StringgetItem()Get the item for which the state will be used in the condition evaluation.getValue()Get the condition comparison value.voidsetCondition(@Nullable String condition) Set the condition comparator, seegetCondition().voidSet the item for which the state will be used in the condition evaluation.voidSet the condition comparison value.
-
Method Details
-
getItem
@Nullable String getItem()Get the item for which the state will be used in the condition evaluation. If no item is set (null returned), the item of the widget will be used.- Returns:
- item
-
setItem
Set the item for which the state will be used in the condition evaluation.- Parameters:
item-
-
getCondition
@Nullable String getCondition()Get the condition comparator. Valid values are: "==", ">", "<", ">=", "<=", "!=". The item in the condition will be compared against the value using this comparator. If no condition comparator is set, "==" is assumed.- Returns:
- condition comparator
-
setCondition
Set the condition comparator, seegetCondition().- Parameters:
condition-
-
getValue
String getValue()Get the condition comparison value.- Returns:
- value
-
setValue
Set the condition comparison value.- Parameters:
value-
-