Package org.openhab.core.library.types
Class ArithmeticGroupFunction.Or
java.lang.Object
org.openhab.core.library.types.ArithmeticGroupFunction.Or
- All Implemented Interfaces:
GroupFunction
- Direct Known Subclasses:
ArithmeticGroupFunction.NOr
- Enclosing interface:
ArithmeticGroupFunction
This does a logical 'or' operation. If at least one item is of 'activeState' this
is returned, otherwise the 'passiveState' is returned.
Through the getStateAs() method, it can be determined, how many
items actually are in the 'activeState'.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.openhab.core.items.GroupFunction
GroupFunction.Equality -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDetermines the current state of a group based on a list of itemsState[]Returns the parameters of the function as an array.<T extends State>
@Nullable TgetStateAs(@Nullable Set<Item> items, Class<T> stateClass) Calculates the group state and returns it as a state of the requested type.
-
Field Details
-
activeState
-
passiveState
-
-
Constructor Details
-
Or
-
-
Method Details
-
calculate
Description copied from interface:GroupFunctionDetermines the current state of a group based on a list of items- Specified by:
calculatein interfaceGroupFunction- Parameters:
items- the items to calculate a group state for- Returns:
- the calculated group state
-
getStateAs
Description copied from interface:GroupFunctionCalculates the group state and returns it as a state of the requested type.- Specified by:
getStateAsin interfaceGroupFunction- Parameters:
items- the items to calculate a group state forstateClass- the type in which the state should be returned- Returns:
- the calculated group state of the requested type or null, if type is not supported
-
getParameters
Description copied from interface:GroupFunctionReturns the parameters of the function as an array.- Specified by:
getParametersin interfaceGroupFunction- Returns:
- the parameters of this function
-