[rules-users] Checking if elements in one collection exist in another collection

Nick Heudecker nheudecker at gmail.com
Tue Dec 16 15:04:52 EST 2008


I have two objects with nested collections in my working memory.  I need to
determine if elements from one collection exist in the other collection.
Here's an idea of what my objects look like:

Class Foo:
List<Token> tokens

Class Bar:
List<Token> tokens

I'm putting instances of Foo and Bar into the working memory.

A few days ago I got this generic suggestion but I'm not sure what it's
actually doing:

A( $colA : collection )
B( $colB : collection )
exists( Object( this memberOf $collectionB ) from $colA )

Can someone expand on that and explain what's happening?  Any help is
appreciated.

Regards,
Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20081216/2e4bfbd1/attachment.html 


More information about the rules-users mailing list