[SOLVED] Making this rule generic

I combed the docs and could not find any mention of these group methods. Can anybody point me to them

Here’s the problem. Everyone treats them as out of scope for their docs. OH doesn’t document them because they are not implemented by openHAB. Xtend doesn’t document them because they are not implemented by Xtend/Xtext. They are actually implemented by the underlying Java Stream interface so you have to go to the JavaDocs to find the official docs.

That’s one reason why I wrote Design Pattern: Working with Groups in Rules which provides some documentation for the more common methods we would want to use in an OH context. The Xtend docs actually does refer to these methods, but only in their Movies example.

1 Like

Thank you @rlkoshak because a link to the java docs was what I was trying to find because I thought that was where it would be

Which is why i struggled, there just isnt enough examples/detail around to explain :frowning:

The other side of the coin is there isn’t enough volunteers to rewrite docs and maintain them for stuff that is implemented and documented elsewhere.

1 Like

Absolutely! I’d write if I knew what I was talking about. At least my thread has alots of information and the rule that works now! Hopefully someone can get benefit from that