«
Rule languages supports extensions to DecimalType
java_import org.openhab.core.library.types.DecimalType
logger.info("DecimalType to °C: #{DecimalType.new(10)|"°C"} equals quantity: #{DecimalType.new(10)|"°C" == QuantityType.new('10°C')}")
java_import org.openhab.core.library.types.DecimalType
logger.info("DecimalType inspected: #{DecimalType.new(10).inspect}")
java_import org.openhab.core.library.types.DecimalType
logger.info("DecimalType is <predicate>: #{DecimalType.new(<value>).<predicate>}")
value | predicate | result | |
---|---|---|---|
0 | zero? | true | |
0 | positive? | false | |
0 | negative? | false | |
1 | zero? | false | |
1 | positive? | true | |
1 | negative? | false | |
-1 | zero? | false | |
-1 | positive? | false | |
-1 | negative? | true |