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 TypeMethodDescriptionGet the condition comparison argument.@Nullable StringGet the condition comparator.@Nullable StringgetItem()Get the item for which the state will be used in the condition evaluation.voidsetArgument(String argument) Set the condition comparison argument.voidsetCondition(@Nullable String condition) Set the condition comparator, seegetCondition().voidSet the item for which the state will be used in the condition evaluation.
-
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-
-
getArgument
String getArgument()Get the condition comparison argument.- Returns:
- argument
-
setArgument
Set the condition comparison argument.- Parameters:
argument-
-