I would like to create a rule that returns a Boolean. This is what I currently have:
val org.eclipse.xtext.xbase.lib.Functions$Function2 checkStateIsBefore = [
org.openhab.core.types.State state, DateTime checkDateTime |
if (state == Uninitialized) {
return true;
} else {
var DateTime stateDateTime = state as DateTime
return stateDateTime.isBefore(checkDateTime)
}
]
But the return type of the apply() method is Object. How can I set the return type to Boolean?
The Eclipse documentation does contain a return value: Link