I have the following lambda rule which ran fine with openhab 1:
org.openhab.core.items.GenericItem out_name,
org.openhab.core.items.GenericItem text,
org.openhab.core.items.GenericItem min,
org.openhab.core.items.GenericItem max,
java.util.HashMap<String, String> mapping |
return false
]
````
What is the correct import for the GenericItem with Openhab2.
All references to org.openhab.core.* in imports and class references should be removed. All of these classes are automatically included and have moved.
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.