I have the following lambda rule which ran fine with openhab 1:
java.util.HashMap<String, String> mapping |
What is the correct import for the GenericItem with Openhab2.
Also, the return is optional. The result of last line executed in the lambda becomes the return value. This is why you cannot have something like a logInfo as the last line of a lambda; it returns void.
I like this notation primarily because you can direct the return type. It also eliminates the warnings in Designer.