Class PersistenceIncludeFilter
java.lang.Object
org.openhab.core.persistence.filter.PersistenceFilter
org.openhab.core.persistence.filter.PersistenceIncludeFilter
The
PersistenceIncludeFilter
is a filter that allows only specific values to pass
The filter returns false
if the string representation of the item's state is not in the given list- Author:
- Jan N. Klug - Initial contribution
-
Constructor Summary
ConstructorDescriptionPersistenceIncludeFilter
(String name, BigDecimal lower, BigDecimal upper, @Nullable String unit, @Nullable Boolean inverted) -
Method Summary
Methods inherited from class org.openhab.core.persistence.filter.PersistenceFilter
equals, getName, hashCode
-
Constructor Details
-
PersistenceIncludeFilter
public PersistenceIncludeFilter(String name, BigDecimal lower, BigDecimal upper, @Nullable String unit, @Nullable Boolean inverted)
-
-
Method Details
-
getLower
-
getUpper
-
getUnit
-
getInverted
public boolean getInverted() -
apply
Description copied from class:PersistenceFilter
Apply this filter to an item- Specified by:
apply
in classPersistenceFilter
- Parameters:
item
- the item to check- Returns:
- true if the filter allows persisting this value
-
persisted
Description copied from class:PersistenceFilter
Notify filter that item was persisted- Specified by:
persisted
in classPersistenceFilter
- Parameters:
item
- the persisted item
-
toString
- Overrides:
toString
in classPersistenceFilter
-