[rules-users] comparing an intersection of sets..

Wolfgang Laun wolfgang.laun at gmail.com
Wed Aug 25 02:07:35 EDT 2010


There's a way for defining custom operators, but it's not worth the hustle
unless you are using this intersecion /= {} very heavily. Stay with eval.
-W

On 24 August 2010 17:42, mechlife <gaiamech at gmail.com> wrote:

>
> Hi,
>
> I have a situation where i need to evaluate a condition where the
> intersection of 2 sets should atleast have one element in it. I am using
> drools template to create the DRL and have a set B (item1,item2, item3,
> item4). Now, at runtime i have a setA (item2, item5). the intersection of
> the sets will have item2 and such should evaluate to true. I am currently
> using evaluate to do a custom function but just wanted to check if there
> was
> a way to do something like this by utilizing one of the existing keywords
> available.
>
> Any insight will be very appreciated. thanks for your time.
>
> -ms
> --
> View this message in context:
> http://drools-java-rules-engine.46999.n3.nabble.com/comparing-an-intersection-of-sets-tp1313555p1313555.html
> Sent from the Drools - User mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20100825/09f1b7d2/attachment.html 


More information about the rules-users mailing list